public class BinaryExtension extends Object implements BayeuxServer.Extension
A server extension that encodes byte[]
or ByteBuffer
into a BinaryData
object using the Z85
format for outgoing messages, and decodes BinaryData
objects back into byte[]
or ByteBuffer
for incoming messages.
BinarySessionExtension
Constructor and Description |
---|
BinaryExtension() |
BinaryExtension(boolean decodeToByteBuffer) |
Modifier and Type | Method and Description |
---|---|
boolean |
rcv(ServerSession from,
ServerMessage.Mutable message)
Blocking version of
BayeuxServer.Extension.incoming(ServerSession, ServerMessage.Mutable, Promise)
for non-meta messages. |
boolean |
send(ServerSession from,
ServerSession to,
ServerMessage.Mutable message)
Blocking version of
BayeuxServer.Extension.outgoing(ServerSession, ServerSession, ServerMessage.Mutable, Promise)
for non-meta messages. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
incoming, outgoing, rcvMeta, sendMeta
public BinaryExtension()
public BinaryExtension(boolean decodeToByteBuffer)
public boolean rcv(ServerSession from, ServerMessage.Mutable message)
BayeuxServer.Extension
Blocking version of BayeuxServer.Extension.incoming(ServerSession, ServerMessage.Mutable, Promise)
for non-meta messages.
rcv
in interface BayeuxServer.Extension
from
- the session that sent the messagemessage
- the incoming messagepublic boolean send(ServerSession from, ServerSession to, ServerMessage.Mutable message)
BayeuxServer.Extension
Blocking version of BayeuxServer.Extension.outgoing(ServerSession, ServerSession, ServerMessage.Mutable, Promise)
for non-meta messages.
send
in interface BayeuxServer.Extension
from
- the session that sent the message or nullto
- the session the message is sent to, or null for a publish.message
- the outgoing messageCopyright © 2008–2024 The CometD Project. All rights reserved.