Interface MessageListener<T extends ChannelPayload>

Type Parameters:
T - the payload type
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface MessageListener<T extends ChannelPayload>
Handles incoming messages for a specific channel.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    accept(MessageContext<T> ctx, T payload)
    Invoked when a message is received.
  • Method Details

    • accept

      void accept(MessageContext<T> ctx, T payload)
      Invoked when a message is received.
      Parameters:
      ctx - the message metadata
      payload - the received data