Interface ServerChannel.MessageListener

    • Method Detail

      • onMessage

        default void onMessage​(ServerSession sender,
                               ServerChannel channel,
                               ServerMessage.Mutable message,
                               Promise<Boolean> promise)

        Callback invoked when a message is being published.

        Implementers can notify the promise with false to signal that the message should not be published.

        sender - the session that publishes the message
        channel - the channel the message is published to
        message - the message to be published
        promise - the promise to notify whether the message processing should continue