com.adobe.livecycle.rca.common.utils
Class LCUtil

java.lang.Object
  extended by com.adobe.livecycle.rca.common.utils.LCUtil

public class LCUtil
extends Object

A utility class created to invoke LiveCycle Service operation


Field Summary
static int DEFAULT_MAX_WAIT_TIME
          Default max wait time, 15 min.
 
Constructor Summary
LCUtil()
           
 
Method Summary
static com.adobe.idp.dsc.clientsdk.ServiceClientFactory getServiceClientFactory()
          For Internal Use Only
static com.adobe.idp.dsc.InvocationResponse invoke(com.adobe.idp.dsc.clientsdk.ServiceClientFactory serviceClientFactory, String serviceName, String operationName, Map serviceArguments, boolean isSynchronousInvocation)
          Invokes given LiveCycle Service
static com.adobe.idp.dsc.InvocationResponse invoke(com.adobe.idp.dsc.clientsdk.ServiceClientFactory serviceClientFactory, String serviceName, String operationName, String[] inParamNames, Object[] inParamValues)
          Invokes given LiveCycle Service synchronously
static Object invoke(com.adobe.idp.dsc.clientsdk.ServiceClientFactory serviceClientFactory, String serviceName, String operationName, String[] inParamNames, Object[] inParamValues, String outParamName, boolean isSynchronousInvocation)
          Invokes given LiveCycle Service
static com.adobe.idp.dsc.InvocationResponse invokeInVM(String serviceName, String operationName, String[] inParamNames, Object[] inParamValues)
          Invokes given LiveCycle Service synchronously in VM, can only be invoked from DSC.
static com.adobe.idp.dsc.InvocationResponse invokeInVM(String serviceName, String operationName, String[] inParamNames, Object[] inParamValues, boolean isSynchronousInvocation)
          Invokes given LiveCycle Service in VM, this can only be invoked from DSC.
static Object invokeInVM(String serviceName, String operationName, String[] inParamNames, Object[] inParamValues, String outParamName)
          Invokes given LiveCycle Service in the same VM, can only be invoked from a DSC.
static Object invokeInVMWithExponentialBackOff(String serviceName, String operationName, String[] inParamNames, Object[] inParamValues, String outParamName, long maxWaitTimeMillis)
          Invokes a LiveCycle Service synchronously.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_MAX_WAIT_TIME

public static final int DEFAULT_MAX_WAIT_TIME
Default max wait time, 15 min.

See Also:
Constant Field Values
Constructor Detail

LCUtil

public LCUtil()
Method Detail

invokeInVM

public static com.adobe.idp.dsc.InvocationResponse invokeInVM(String serviceName,
                                                              String operationName,
                                                              String[] inParamNames,
                                                              Object[] inParamValues)
                                                       throws com.adobe.idp.dsc.DSCException
Invokes given LiveCycle Service synchronously in VM, can only be invoked from DSC.

Parameters:
serviceName - Name of the Service
operationName - Name of the operation
inParamNames - Name of the input parameters
inParamValues - Values of input parameters
Returns:
InvocationResponse
Throws:
com.adobe.idp.dsc.DSCException - whenever there is any error in invocation

invoke

public static com.adobe.idp.dsc.InvocationResponse invoke(com.adobe.idp.dsc.clientsdk.ServiceClientFactory serviceClientFactory,
                                                          String serviceName,
                                                          String operationName,
                                                          String[] inParamNames,
                                                          Object[] inParamValues)
                                                   throws com.adobe.idp.dsc.DSCException
Invokes given LiveCycle Service synchronously

Parameters:
serviceClientFactory - Service Client Factory
serviceName - Name of the Service
operationName - Name of the operation
inParamNames - Name of the input parameters
inParamValues - Values of input parameters
Returns:
InvocationResponse
Throws:
com.adobe.idp.dsc.DSCException - whenever there is any error in invocation

invokeInVM

public static com.adobe.idp.dsc.InvocationResponse invokeInVM(String serviceName,
                                                              String operationName,
                                                              String[] inParamNames,
                                                              Object[] inParamValues,
                                                              boolean isSynchronousInvocation)
                                                       throws com.adobe.idp.dsc.DSCException
Invokes given LiveCycle Service in VM, this can only be invoked from DSC.

Parameters:
serviceName - Name of the Service
operationName - Name of the operation
inParamNames - Name of the input parameters
inParamValues - Values of input parameters
isSynchronousInvocation - Flag to specify if the service operation is to be invoked synchronously or asynchronously.
Returns:
InvocationResponse
Throws:
com.adobe.idp.dsc.DSCException - whenever there is any error in invocation

invoke

public static com.adobe.idp.dsc.InvocationResponse invoke(com.adobe.idp.dsc.clientsdk.ServiceClientFactory serviceClientFactory,
                                                          String serviceName,
                                                          String operationName,
                                                          Map serviceArguments,
                                                          boolean isSynchronousInvocation)
                                                   throws com.adobe.idp.dsc.DSCException
Invokes given LiveCycle Service

Parameters:
serviceClientFactory - Service Client Factory
serviceName - Name of the Service
operationName - Name of the operation
serviceArguments - service arguments as key value pair.
isSynchronousInvocation - Flag to specify if the service operation is to be invoked synchronously or asynchronously.
Returns:
InvocationResponse
Throws:
com.adobe.idp.dsc.DSCException - whenever there is any error in invocation

invokeInVM

public static Object invokeInVM(String serviceName,
                                String operationName,
                                String[] inParamNames,
                                Object[] inParamValues,
                                String outParamName)
                         throws com.adobe.idp.dsc.DSCException
Invokes given LiveCycle Service in the same VM, can only be invoked from a DSC.

Parameters:
serviceName - Name of the Service
operationName - Name of the operation
inParamNames - Name of the input parameters
inParamValues - Values of input parameters
outParamName - Name of the output parameter
Returns:
Output of the service operation invocation.
Throws:
com.adobe.idp.dsc.DSCException - whenever there is any error in invocation.

invoke

public static Object invoke(com.adobe.idp.dsc.clientsdk.ServiceClientFactory serviceClientFactory,
                            String serviceName,
                            String operationName,
                            String[] inParamNames,
                            Object[] inParamValues,
                            String outParamName,
                            boolean isSynchronousInvocation)
                     throws com.adobe.idp.dsc.DSCException
Invokes given LiveCycle Service

Parameters:
serviceClientFactory - Service Client Factory
serviceName - Name of the Service
operationName - Name of the operation
inParamNames - Name of the input parameters
inParamValues - Values of input parameters
outParamName - Name of the output parameter
isSynchronousInvocation - Flag to specify if the service operation is to be invoked synchronously or asynchronously.
Returns:
Output of the service operation invocation.
Throws:
com.adobe.idp.dsc.DSCException - whenever there is any error in invocation.

getServiceClientFactory

public static com.adobe.idp.dsc.clientsdk.ServiceClientFactory getServiceClientFactory()
For Internal Use Only


invokeInVMWithExponentialBackOff

public static Object invokeInVMWithExponentialBackOff(String serviceName,
                                                      String operationName,
                                                      String[] inParamNames,
                                                      Object[] inParamValues,
                                                      String outParamName,
                                                      long maxWaitTimeMillis)
                                               throws com.adobe.idp.dsc.DSCException
Invokes a LiveCycle Service synchronously. It is used in case of Pooled services (only short lived services).

Parameters:
serviceName - Name of the Service
operationName - Name of the operation
inParamNames - Name of the input parameters
inParamValues - Values of input parameters
outParamName - Name of the output parameter
maxWaitTimeMillis - Maximum time in milliseconds, the request should wait before it errors out. There's an upper limit to this time, which is LCUtil.DEFAULT_MAX_WAIT_TIME
Returns:
Output of the service operation invocation.
Throws:
com.adobe.idp.dsc.DSCException - whenever there is any error in invocation.


[an error occurred while processing this directive] [an error occurred while processing this directive]