public static interface BayeuxServer.Extension
Extension API for BayeuxServer.
Implementations of this interface allow to modify incoming and outgoing messages before any other processing performed by the implementation.
Multiple extensions can be registered; the extension receive methods are invoked in registration order, while the extension send methods are invoked in registration reverse order.
BayeuxServer.addExtension(Extension)| Modifier and Type | Method and Description |
|---|---|
default void |
incoming(ServerSession from,
ServerMessage.Mutable message,
org.cometd.bayeux.Promise<Boolean> promise)
Callback method invoked every time a message is incoming.
|
default void |
outgoing(ServerSession from,
ServerSession to,
ServerMessage.Mutable message,
org.cometd.bayeux.Promise<Boolean> promise)
Callback method invoked every time a message is outgoing.
|
default boolean |
rcv(ServerSession from,
ServerMessage.Mutable message)
Blocking version of
incoming(ServerSession, ServerMessage.Mutable, Promise)
for non-meta messages. |
default boolean |
rcvMeta(ServerSession from,
ServerMessage.Mutable message)
Blocking version of
incoming(ServerSession, ServerMessage.Mutable, Promise)
for meta messages. |
default boolean |
send(ServerSession from,
ServerSession to,
ServerMessage.Mutable message)
Blocking version of
outgoing(ServerSession, ServerSession, ServerMessage.Mutable, Promise)
for non-meta messages. |
default boolean |
sendMeta(ServerSession to,
ServerMessage.Mutable message)
Blocking version of
outgoing(ServerSession, ServerSession, ServerMessage.Mutable, Promise)
for meta messages. |
default void incoming(ServerSession from, ServerMessage.Mutable message, org.cometd.bayeux.Promise<Boolean> promise)
Callback method invoked every time a message is incoming.
from - the session that sent the messagemessage - the incoming messagepromise - the promise to notify whether message processing should continuedefault boolean rcv(ServerSession from, ServerMessage.Mutable message)
Blocking version of incoming(ServerSession, ServerMessage.Mutable, Promise)
for non-meta messages.
from - the session that sent the messagemessage - the incoming messagedefault boolean rcvMeta(ServerSession from, ServerMessage.Mutable message)
Blocking version of incoming(ServerSession, ServerMessage.Mutable, Promise)
for meta messages.
from - the session that sent the messagemessage - the incoming messagedefault void outgoing(ServerSession from, ServerSession to, ServerMessage.Mutable message, org.cometd.bayeux.Promise<Boolean> promise)
Callback method invoked every time a message is outgoing.
from - the session that sent the message or nullto - the session the message is sent to, or null for a publish.message - the outgoing messagepromise - the promise to notify whether message processing should continuedefault boolean send(ServerSession from, ServerSession to, ServerMessage.Mutable message)
Blocking version of outgoing(ServerSession, ServerSession, ServerMessage.Mutable, Promise)
for non-meta messages.
from - the session that sent the message or nullto - the session the message is sent to, or null for a publish.message - the outgoing messagedefault boolean sendMeta(ServerSession to, ServerMessage.Mutable message)
Blocking version of outgoing(ServerSession, ServerSession, ServerMessage.Mutable, Promise)
for meta messages.
to - the session the message is sent to, or null for a publish.message - the outgoing messageCopyright © 2008–2024 The CometD Project. All rights reserved.