java.lang.Object
com.zeroc.Ice.ErrorObserverMiddleware
- All Implemented Interfaces:
Object
Provides a simple middleware that allows applications to observe any
Errors thrown by the
dispatch of an incoming request.-
Nested Class Summary
Nested classes/interfaces inherited from interface com.zeroc.Ice.Object
Object.Ice_invokeResult -
Constructor Summary
ConstructorsConstructorDescriptionErrorObserverMiddleware(Object next, Consumer<Error> errorObserver) Constructs a ErrorObserverMiddleware. -
Method Summary
Modifier and TypeMethodDescriptiondispatch(IncomingRequest request) Dispatches an incoming request and returns the corresponding outgoing response.
-
Constructor Details
-
ErrorObserverMiddleware
Constructs a ErrorObserverMiddleware.- Parameters:
next- the next dispatcher in the chainerrorObserver- the error observer. If the provided observer throws an exception while observing an error, this exception replaces the observed error for the remainder of the dispatch.
-
-
Method Details
-
dispatch
Description copied from interface:ObjectDispatches an incoming request and returns the corresponding outgoing response.- Specified by:
dispatchin interfaceObject- Parameters:
request- the incoming request- Returns:
- a
CompletionStagethat will complete with the outgoing response - Throws:
UserException- If aUserExceptionis thrown, Ice will marshal it as the response payload.
-