Skip navigation links

Oracle Communications Services Gatekeeper Java API Reference
5.0

E21717-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 partial request for a subset of request infos.
 RequestInfo createRequestInfo(Class type, Method method, Object[] args)
          Create the request info.
 RequestInfo[] createRequestInfos(Class type, Method method, Object[] args)
          Creates multiple request infos 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 a partial results into one result.
 void validateRequest(Method method, Object[] args)
          Validate 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 partial request for a subset of request infos. Only if a request supports multiple plug-ins does this method need to be implemented.
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 request infos for one request. Used to be able to route requests to multiple plug-ins. A request factory only needs to implement the createRequestInfo method if this is not supported.
Returns:
The request infos

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

mergeResults

public Object mergeResults(RequestInfo[] ris,
                           List results)
Merges a partial results into one result. Only if a request supports multiple plug-ins does this method need to be implemented.
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 request.
Throws:
Exception - on validation error
Throwable

Skip navigation links

Oracle Communications Services Gatekeeper Java API Reference
5.0

E21717-02


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