Interface RemoteFunctionRequestErrorHandler
Deprecated.
This module will be discontinued, along with its classes and methods.
Gets invoked after the execution of an
AbstractRemoteFunctionRequest
and allows to inspect and react on the
AbstractRemoteFunctionRequestResult
.
Example:
You may implement and register your own RemoteFunctionRequestErrorHandler
for the invocation of BAPIs. You
want to introduce special treament for a certain error message of the invoked BAPI. In your own
RemoteFunctionRequestErrorHandler
you gain access to the request result and can react accordingly.
Note: The request execution logic of AbstractRemoteFunctionRequest
using a CommitStrategy
that
includes a commit in the remote system (CommitStrategy.COMMIT_SYNC
, CommitStrategy.COMMIT_ASYNC
)
invokes a rollback in the remote system if the used RemoteFunctionRequestErrorHandler
throws a
RemoteFunctionException
. Otherwise, no rollback is invoked the remote system.
-
Method Summary
Modifier and TypeMethodDescription<RequestT extends AbstractRemoteFunctionRequest<RequestT,
RequestResultT>, RequestResultT extends AbstractRemoteFunctionRequestResult<RequestT, RequestResultT>>
io.vavr.control.Option<RemoteFunctionException>handleRequestResult
(RequestResultT requestResult) Deprecated.Allows to inspect the request result after the request execution and react accordingly.
-
Method Details
-
handleRequestResult
@Nonnull <RequestT extends AbstractRemoteFunctionRequest<RequestT,RequestResultT>, io.vavr.control.Option<RemoteFunctionException> handleRequestResultRequestResultT extends AbstractRemoteFunctionRequestResult<RequestT, RequestResultT>> (@Nonnull RequestResultT requestResult) Deprecated.Allows to inspect the request result after the request execution and react accordingly. In order to indicate an error situation, you may return aRemoteFunctionException
or one subclass encapsulated in anOption
. Otherwise, return an emptyOption
. In case of an error situation, the request exceution logic triggers a rollback in the remote system if aCommitStrategy
including commit behaviour is used.- Type Parameters:
RequestT
- The type of the requestRequestResultT
- the type of the request result- Parameters:
requestResult
- The request result to inspect- Returns:
Option
containing aRemoteFunctionException
or being empty.
-