public static interface ServerSession.Extension
Extension API for ServerSession
.
Implementations of this interface allow to modify incoming and outgoing messages respectively just before and just after they are handled by the implementation, either on client side or server side.
Extensions are be registered in order and one extension may allow subsequent extensions to process the message by returning true from the callback method, or forbid further processing by returning false.
Modifier and Type | Interface and Description |
---|---|
static class |
ServerSession.Extension.Adapter
Empty implementation of
ServerSession.Extension . |
Modifier and Type | Method and 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.
|
boolean rcv(ServerSession session, ServerMessage.Mutable message)
Callback method invoked every time a normal message is incoming.
session
- the session that sent the messagemessage
- the incoming messageboolean rcvMeta(ServerSession session, ServerMessage.Mutable message)
Callback method invoked every time a meta message is incoming.
session
- the session that is sent the messagemessage
- the incoming meta messageServerMessage send(ServerSession session, ServerMessage message)
Callback method invoked every time a normal message is outgoing.
session
- the session receiving the messagemessage
- the outgoing messageboolean sendMeta(ServerSession session, ServerMessage.Mutable message)
Callback method invoked every time a meta message is outgoing.
session
- the session receiving the messagemessage
- the outgoing meta messageCopyright © 2008–2017 The CometD Project. All rights reserved.