Class MethodInvokingMessageInterceptor

java.lang.Object
de.otto.synapse.endpoint.MethodInvokingMessageInterceptor
All Implemented Interfaces:
MessageInterceptor

public class MethodInvokingMessageInterceptor
extends java.lang.Object
implements MessageInterceptor
A MessageConsumer that is calling a method of a class instance for every accepted Message

MesageConsumer

  • Constructor Summary

    Constructors 
    Constructor Description
    MethodInvokingMessageInterceptor​(java.lang.Object instance, java.lang.reflect.Method method)  
  • Method Summary

    Modifier and Type Method Description
    TextMessage intercept​(TextMessage message)
    Intercept a message and return the same message, a modified version of the incoming message, or null, if the message should be filtered out and dropped by the AbstractMessageEndpoint

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • intercept

      @Nullable public TextMessage intercept​(@Nonnull TextMessage message)
      Description copied from interface: MessageInterceptor
      Intercept a message and return the same message, a modified version of the incoming message, or null, if the message should be filtered out and dropped by the AbstractMessageEndpoint
      Specified by:
      intercept in interface MessageInterceptor
      Parameters:
      message - the channel-layer message with payload-type beeing a String
      Returns:
      intercepted version of the message, or null if the message should be dropped.