Class AuthenticatingInterceptor
java.lang.Object
io.fluxcapacitor.javaclient.tracking.handling.authentication.AuthenticatingInterceptor
- All Implemented Interfaces:
DispatchInterceptor,HandlerDecorator,HandlerInterceptor
public class AuthenticatingInterceptor
extends Object
implements DispatchInterceptor, HandlerInterceptor
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.fluxcapacitor.javaclient.tracking.handling.HandlerDecorator
HandlerDecorator.MergedDecoratorNested classes/interfaces inherited from interface io.fluxcapacitor.javaclient.tracking.handling.HandlerInterceptor
HandlerInterceptor.InterceptedHandler -
Field Summary
Fields inherited from interface io.fluxcapacitor.javaclient.publishing.DispatchInterceptor
noOpFields inherited from interface io.fluxcapacitor.javaclient.tracking.handling.HandlerDecorator
noOp -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioninterceptDispatch(Message m, MessageType messageType) Intercepts the publication of a message.interceptHandling(Function<DeserializingMessage, Object> function, HandlerInvoker invoker) Intercepts a message before it's handled.wrap(Handler<DeserializingMessage> handler) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.fluxcapacitor.javaclient.publishing.DispatchInterceptor
andThen, modifySerializedMessageMethods inherited from interface io.fluxcapacitor.javaclient.tracking.handling.HandlerDecorator
andThen
-
Constructor Details
-
AuthenticatingInterceptor
public AuthenticatingInterceptor()
-
-
Method Details
-
interceptDispatch
Description copied from interface:DispatchInterceptorIntercepts the publication of a message. Implementers can use this to modify the contents of a message or block the publication altogether.Return
nullor throw an exception to prevent publication of the message.- Specified by:
interceptDispatchin interfaceDispatchInterceptor
-
interceptHandling
public Function<DeserializingMessage,Object> interceptHandling(Function<DeserializingMessage, Object> function, HandlerInvoker invoker) Description copied from interface:HandlerInterceptorIntercepts a message before it's handled. The underlying handler can be invoked using the givenfunction.Before invoking the handler it is possible to inspect or modify the message. It is also possible to block a message simply by returning a function that returns without invoking the handler.
After invoking the handler it is possible to inspect or modify the response.
The given
invokercontains information about the underlying handler.- Specified by:
interceptHandlingin interfaceHandlerInterceptor
-
wrap
- Specified by:
wrapin interfaceHandlerDecorator- Specified by:
wrapin interfaceHandlerInterceptor
-