Package org.cometd.bayeux.server
Interface ServerSession.Extension
- All Known Implementing Classes:
AcknowledgedMessagesSessionExtension
,ActivityExtension.SessionExtension
,BinarySessionExtension
,ServerSession.Extension.Adapter
- Enclosing interface:
- ServerSession
public static interface ServerSession.Extension
Extension API for ServerSession
.
Implementations of this interface allow to modify incoming and outgoing messages
for a particular session, before any other processing performed by the implementation
but after BayeuxServer.Extension
processing.
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.
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
ServerSession.Extension.Adapter
Empty implementation ofServerSession.Extension
. -
Method Summary
Modifier and Type Method Description boolean
rcv(ServerSession session, ServerMessage.Mutable message)
Callback method invoked every time a normal message is incoming.boolean
rcvMeta(ServerSession session, ServerMessage.Mutable message)
Callback method invoked every time a meta message is incoming.ServerMessage
send(ServerSession session, ServerMessage message)
Callback method invoked every time a normal message is outgoing.boolean
sendMeta(ServerSession session, 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:
session
- 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:
session
- the session that is 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:
session
- the session receiving the messagemessage
- the outgoing message- Returns:
- The message to send or null to not send the message
-
sendMeta
Callback method invoked every time a meta message is outgoing.
- Parameters:
session
- the session receiving the messagemessage
- the outgoing meta message- Returns:
- true if message processing should continue, false if it should stop
-