public static interface BayeuxServer.Extension
Extension API for BayeuxServer
.
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.
BayeuxServer.addExtension(Extension)
Modifier and Type | Interface and Description |
---|---|
static class |
BayeuxServer.Extension.Adapter
Empty implementation of
BayeuxServer.Extension . |
Modifier and Type | Method and Description |
---|---|
boolean |
rcv(ServerSession from,
ServerMessage.Mutable message)
Callback method invoked every time a normal message is incoming.
|
boolean |
rcvMeta(ServerSession from,
ServerMessage.Mutable message)
Callback method invoked every time a meta message is incoming.
|
boolean |
send(ServerSession from,
ServerSession to,
ServerMessage.Mutable message)
Callback method invoked every time a normal message is outgoing.
|
boolean |
sendMeta(ServerSession to,
ServerMessage.Mutable message)
Callback method invoked every time a meta message is outgoing.
|
boolean rcv(ServerSession from, ServerMessage.Mutable message)
Callback method invoked every time a normal message is incoming.
from
- the session that sent the messagemessage
- the incoming messageboolean rcvMeta(ServerSession from, ServerMessage.Mutable message)
Callback method invoked every time a meta message is incoming.
from
- the session that sent the messagemessage
- the incoming meta messageboolean send(ServerSession from, ServerSession to, ServerMessage.Mutable message)
Callback method invoked every time a normal message is outgoing.
from
- the session that sent the message or nullto
- the session the message is sent to, or null for a publish.message
- the outgoing messageboolean sendMeta(ServerSession to, ServerMessage.Mutable message)
Callback method invoked every time a meta message is outgoing.
to
- the session the message is sent to, or null for a publish.message
- the outgoing meta messageCopyright © 2008–2016 The CometD Project. All rights reserved.