Interface MessageEndpoint

    • Method Detail

      • getChannelName

        @Nonnull
        java.lang.String getChannelName()
        Returns the name of the channel.

        The channel name corresponds to the name of the underlying stream, queue or message log.

        Returns:
        name of the channel
      • intercept

        @Nullable
        TextMessage intercept​(@Nonnull
                              TextMessage message)
        Intercepts a message using all registered interceptors and returns the resulting message.

        The interceptors are called in order. The result of one interceptor is propagated to the next interceptor in the chain, until the end of the chain is reached, or one interceptor has returned null.

        If null is returned, the message must be dropped by the AbstractMessageEndpoint.

        Every interceptor may transform the message, or may take additional actions like, for example, logging, monitoring or other things.

        Parameters:
        message - the message to intercept
        Returns:
        the (possibly modified) message, or null if the message should be dropped.