public class BinaryExtension extends Object implements ClientSession.Extension
A client 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.
Constructor and Description |
---|
BinaryExtension() |
BinaryExtension(boolean decodeToByteBuffer) |
Modifier and Type | Method and Description |
---|---|
boolean |
rcv(ClientSession session,
Message.Mutable message)
Callback method invoked every time a normal message is received.
|
boolean |
send(ClientSession session,
Message.Mutable message)
Callback method invoked every time a normal message is being sent.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
incoming, outgoing, rcvMeta, sendMeta
public BinaryExtension()
public BinaryExtension(boolean decodeToByteBuffer)
public boolean rcv(ClientSession session, Message.Mutable message)
ClientSession.Extension
rcv
in interface ClientSession.Extension
session
- the session object that is receiving the messagemessage
- the message receivedpublic boolean send(ClientSession session, Message.Mutable message)
ClientSession.Extension
send
in interface ClientSession.Extension
session
- the session object that is sending the messagemessage
- the message being sentCopyright © 2008–2024 The CometD Project. All rights reserved.