public static interface ServerChannel.MessageListener extends ConfigurableServerChannel.ServerChannelListener
Listeners objects that implement this interface will be notified of message publish.
ConfigurableServerChannel.ServerChannelListener.Weak
Modifier and Type | Method and Description |
---|---|
default boolean |
onMessage(ServerSession sender,
ServerChannel channel,
ServerMessage.Mutable message)
Blocking version of
onMessage(ServerSession, ServerChannel, ServerMessage.Mutable, Promise) . |
default void |
onMessage(ServerSession sender,
ServerChannel channel,
ServerMessage.Mutable message,
Promise<Boolean> promise)
Callback invoked when a message is being published.
|
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 messagechannel
- the channel the message is published tomessage
- the message to be publishedpromise
- the promise to notify whether the message processing should continuedefault boolean onMessage(ServerSession sender, ServerChannel channel, ServerMessage.Mutable message)
Blocking version of onMessage(ServerSession, ServerChannel, ServerMessage.Mutable, Promise)
.
sender
- the session that publishes the messagechannel
- the channel the message is published tomessage
- the message to be publishedCopyright © 2008–2024 The CometD Project. All rights reserved.