Skip navigation links

Oracle Communications Services Gatekeeper Java API Reference
6.0

E55513-02


com.bea.wlcp.wlng.api.plugin
Class RequestFactory

java.lang.Object
  extended bycom.bea.wlcp.wlng.api.plugin.RequestFactory


public class RequestFactory
extends Object

The Request factory is used to perform traffic path-specific processing before and after a request is processed in the plug-in. There should be one implementation for each application-facing interface.


Constructor Summary
RequestFactory()
           

 

Method Summary
 Throwable convertEx(Method method, Throwable t)
          Converts a generic exception to a service-specific exception.
 Object[] createPartialRequest(List ris)
          Create a partial request for a subset of RequestInfos.
 RequestInfo createRequestInfo(Class type, Method method, Object[] args)
          Create the request info.
 RequestInfo[] createRequestInfos(Class type, Method method, Object[] args)
          Creates multiple RequestInfos for one request.
static Object getArgument(int index, Object[] args)
          Helper method for finding the argument on specific index.
 Object mergeResults(RequestInfo[] ris, List results)
          Merges partial results into one result.
 void validateRequest(Method method, Object[] args)
          Validate the request.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

RequestFactory

public RequestFactory()

Method Detail

convertEx

public Throwable convertEx(Method method,
                           Throwable t)
Converts a generic exception to a service-specific exception.
Parameters:
method - The method that was called.
t - The exception to convert.
Returns:
A converted exception.

createPartialRequest

public Object[] createPartialRequest(List ris)
Create a partial request for a subset of RequestInfos. This method only needs to be implemented if a request supports multiple plug-ins.
Parameters:
ris - The request information.
Returns:
The request.

createRequestInfo

public RequestInfo createRequestInfo(Class type,
                                     Method method,
                                     Object[] args)
Create the request info.
Returns:
The request info.

createRequestInfos

public RequestInfo[] createRequestInfos(Class type,
                                        Method method,
                                        Object[] args)
Creates multiple RequestInfos for one request. Used to route requests to multiple plug-ins. A request factory only needs to implement the createRequestInfo method if this is not supported.
Returns:
The RequestInfo.

getArgument

public static final Object getArgument(int index,
                                       Object[] args)
Helper method for finding the argument on specific index.
Parameters:
args - Arguments.
index - Index.
Returns:
The argument or null if not found.

mergeResults

public Object mergeResults(RequestInfo[] ris,
                           List results)
Merges partial results into one result. This method only needs to be implemented if a request supports multiple plug-ins.
Parameters:
ris - The request information.
results - The result from all requests.
Returns:
The merged result.

validateRequest

public void validateRequest(Method method,
                            Object[] args)
                     throws Throwable
Validate the request.
Throws:
Exception - on validation error.
Throwable

Skip navigation links

Oracle Communications Services Gatekeeper Java API Reference
6.0

E55513-02


Copyright © 2008, 2015, Oracle and/or its affiliates. All rights reserved.