Interface BayeuxServer.Extension
- Enclosing interface:
- BayeuxServer
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.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidincoming(ServerSession from, ServerMessage.Mutable message, org.cometd.bayeux.Promise<Boolean> promise) Callback method invoked every time a message is incoming.default voidoutgoing(ServerSession from, ServerSession to, ServerMessage.Mutable message, org.cometd.bayeux.Promise<Boolean> promise) Callback method invoked every time a message is outgoing.default booleanrcv(ServerSession from, ServerMessage.Mutable message) Blocking version ofincoming(ServerSession, ServerMessage.Mutable, Promise)for non-meta messages.default booleanrcvMeta(ServerSession from, ServerMessage.Mutable message) Blocking version ofincoming(ServerSession, ServerMessage.Mutable, Promise)for meta messages.default booleansend(ServerSession from, ServerSession to, ServerMessage.Mutable message) Blocking version ofoutgoing(ServerSession, ServerSession, ServerMessage.Mutable, Promise)for non-meta messages.default booleansendMeta(ServerSession to, ServerMessage.Mutable message) Blocking version ofoutgoing(ServerSession, ServerSession, ServerMessage.Mutable, Promise)for meta messages.
-
Method Details
-
incoming
default void incoming(ServerSession from, ServerMessage.Mutable message, org.cometd.bayeux.Promise<Boolean> promise) Callback method invoked every time a message is incoming.
- Parameters:
from- the session that sent the messagemessage- the incoming messagepromise- the promise to notify whether message processing should continue
-
rcv
Blocking version of
incoming(ServerSession, ServerMessage.Mutable, Promise)for non-meta messages.- Parameters:
from- the session that sent the messagemessage- the incoming message- Returns:
- whether message processing should continue
-
rcvMeta
Blocking version of
incoming(ServerSession, ServerMessage.Mutable, Promise)for meta messages.- Parameters:
from- the session that sent the messagemessage- the incoming message- Returns:
- whether message processing should continue
-
outgoing
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.
- Parameters:
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 continue
-
send
Blocking version of
outgoing(ServerSession, ServerSession, ServerMessage.Mutable, Promise)for non-meta messages.- Parameters:
from- the session that sent the message or nullto- the session the message is sent to, or null for a publish.message- the outgoing message- Returns:
- whether message processing should continue
-
sendMeta
Blocking version of
outgoing(ServerSession, ServerSession, ServerMessage.Mutable, Promise)for meta messages.- Parameters:
to- the session the message is sent to, or null for a publish.message- the outgoing message- Returns:
- whether message processing should continue
-