Package org.cometd.bayeux.server
Interface BayeuxServer.Extension
- All Known Implementing Classes:
AcknowledgedMessagesExtension,ActivityExtension,BayeuxServer.Extension.Adapter,BinaryExtension,TimestampExtension,TimesyncExtension
- Enclosing interface:
- BayeuxServer
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.
- See Also:
BayeuxServer.addExtension(Extension)
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classBayeuxServer.Extension.AdapterEmpty implementation ofBayeuxServer.Extension. -
Method Summary
Modifier and Type Method Description booleanrcv(ServerSession from, ServerMessage.Mutable message)Callback method invoked every time a normal message is incoming.booleanrcvMeta(ServerSession from, ServerMessage.Mutable message)Callback method invoked every time a meta message is incoming.booleansend(ServerSession from, ServerSession to, ServerMessage.Mutable message)Callback method invoked every time a normal message is outgoing.booleansendMeta(ServerSession to, ServerMessage.Mutable message)Callback method invoked every time a meta message is outgoing.
-
Method Details
-
rcv
Callback method invoked every time a normal message is incoming.
- Parameters:
from- the session that sent the messagemessage- the incoming message- Returns:
- true if message processing should continue, false if it should stop
-
rcvMeta
Callback method invoked every time a meta message is incoming.
- Parameters:
from- the session that sent the messagemessage- the incoming meta message- Returns:
- true if message processing should continue, false if it should stop
-
send
Callback method invoked every time a normal 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 message- Returns:
- true if message processing should continue, false if it should stop
-
sendMeta
Callback method invoked every time a meta message is outgoing.
- Parameters:
to- the session the message is sent to, or null for a publish.message- the outgoing meta message- Returns:
- true if message processing should continue, false if it should stop
-