java.lang.Object
com.zeroc.Ice.ErrorObserverMiddleware
- All Implemented Interfaces:
Object
Provides a simple middleware that allows applications to observe java.lang.Error 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 chain.errorObserver
- The error observer. If error observer throws an exception while observing an error, this exception replaces the error for the remainder of the dispatch.
-
-
Method Details
-
dispatch
Description copied from interface:Object
Dispatches an incoming request and returns the corresponding outgoing response.- Specified by:
dispatch
in interfaceObject
- Parameters:
request
- The incoming request.- Returns:
- The outgoing response.
- Throws:
UserException
- If aUserException
is thrown, Ice will marshal it as the response payload.
-