public interface DataPostProcessor2
Use DataPostProcessor2 to add custom post-processing logic (like manipulating
the data returned by the service call) to the operation after a back-end
service call is made by the Connector. If the Connector execution is
successful, then result
object will have "opstatus" of type
Param
with value (zero for success
and non-zero for failure).
If either the pre-processor or the Connector throws an exception then instead
of execute
method, OnException
method is called. Refer
documentation of OnException
for more details.
Note: DataPostProcessor2 is a singleton - only one instance of this class is created and the same is used for every service call. Therefore, DataPostProcessor should not have any user/request specific data or state. Any data common to all the users/requests may be stored.
DataPreProcessor
,
DataPreProcessor2
,
DataPostProcessor
,
Param
,
OnException
Modifier and Type | Method and Description |
---|---|
Object |
execute(Result result,
DataControllerRequest request,
DataControllerResponse response)
Performs custom post-processor logic after calling the back-end service.
|
Object execute(Result result, DataControllerRequest request, DataControllerResponse response) throws Exception
result
- A result of the pre-process and back-end service calls.request
- A wrapper over actual client requestresponse
- A wrapper over actual client response to be returned to
clientResult
that will be
returned to the client.Exception
- any error in pre-processingDataControllerRequest
,
Result
Copyright © 2019. All rights reserved.