public static interface ClientSession.Extension
Extension API for client session.
An extension allows user code to interact with the Bayeux protocol as late as messages are sent or as soon as messages are received.
Messages may be modified, or state held, so that the extension adds a specific behavior simply by observing the flow of Bayeux messages.
ClientSession.addExtension(Extension)
Modifier and Type | Interface and Description |
---|---|
static class |
ClientSession.Extension.Adapter
Empty implementation of
ClientSession.Extension . |
Modifier and Type | Method and Description |
---|---|
boolean |
rcv(ClientSession session,
Message.Mutable message)
Callback method invoked every time a normal message is received.
|
boolean |
rcvMeta(ClientSession session,
Message.Mutable message)
Callback method invoked every time a meta message is received.
|
boolean |
send(ClientSession session,
Message.Mutable message)
Callback method invoked every time a normal message is being sent.
|
boolean |
sendMeta(ClientSession session,
Message.Mutable message)
Callback method invoked every time a meta message is being sent.
|
boolean rcv(ClientSession session, Message.Mutable message)
session
- the session object that is receiving the messagemessage
- the message receivedboolean rcvMeta(ClientSession session, Message.Mutable message)
session
- the session object that is receiving the meta messagemessage
- the meta message receivedboolean send(ClientSession session, Message.Mutable message)
session
- the session object that is sending the messagemessage
- the message being sentboolean sendMeta(ClientSession session, Message.Mutable message)
session
- the session object that is sending the messagemessage
- the meta message being sentCopyright © 2008–2017 The CometD Project. All rights reserved.