public interface JavaService2
Use JavaService2 to execute custom logic (Java code) as an integration service call. The custom logic will go through the normal flow of pre-processor before the call and post processor after the call. The integration service thus formed using the custom logic can be used like any other integration service, for example, as part of another orchestration service.
Note: JavaService2 is a singleton - only one instance of this class is created and the same is used for every service call. Therefore, JavaService2 should not have any user/request specific data or state. Any data common to all the users/requests may be stored.
JavaService
Modifier and Type | Method and Description |
---|---|
Object |
invoke(String methodID,
Object[] inputArray,
DataControllerRequest request,
DataControllerResponse response)
Use to invoke the custom logic (Java code) of this service.
|
Object invoke(String methodID, Object[] inputArray, DataControllerRequest request, DataControllerResponse response) throws Exception
methodID
- The id of the method to executeinputArray
- An array of all inputs needed to execute the method. This
contains three maps -
String
) as keys and config value (Object
) as value
String
) as keys and parameter value (Object
) as
valueString
) as keys and parameter value (String
) as
valuerequest
- A wrapper over actual client requestresponse
- A wrapper over actual client response to be returned to
clientResult
to denote the result of this invocation. The result should have
parameter of type Param
with name "opstatus". The "opstatus" value should be 0 if the
execution is successful or non-zero if the execution failed.Exception
- Any error in invocationCopyright © 2019. All rights reserved.