Class DataProtectionInterceptor

java.lang.Object
io.fluxcapacitor.javaclient.publishing.dataprotection.DataProtectionInterceptor
All Implemented Interfaces:
DispatchInterceptor, HandlerDecorator, HandlerInterceptor

public class DataProtectionInterceptor extends Object implements DispatchInterceptor, HandlerInterceptor
  • Field Details

    • METADATA_KEY

      public static String METADATA_KEY
  • Constructor Details

    • DataProtectionInterceptor

      public DataProtectionInterceptor()
  • Method Details

    • interceptDispatch

      public Message interceptDispatch(Message m, MessageType messageType)
      Description copied from interface: DispatchInterceptor
      Intercepts the publication of a message. Implementers can use this to modify the contents of a message or block the publication altogether.

      Return null or throw an exception to prevent publication of the message.

      Specified by:
      interceptDispatch in interface DispatchInterceptor
    • interceptHandling

      public Function<DeserializingMessage,Object> interceptHandling(Function<DeserializingMessage,Object> function, HandlerInvoker invoker)
      Description copied from interface: HandlerInterceptor
      Intercepts a message before it's handled. The underlying handler can be invoked using the given function.

      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 invoker contains information about the underlying handler.

      Specified by:
      interceptHandling in interface HandlerInterceptor