Package org.cometd.client.ext
Class BinaryExtension
- java.lang.Object
-
- org.cometd.client.ext.BinaryExtension
-
- All Implemented Interfaces:
ClientSession.Extension
public class BinaryExtension extends java.lang.Object implements ClientSession.Extension
A client extension that encodes
byte[]
orByteBuffer
into aBinaryData
object using theZ85
format for outgoing messages, and decodesBinaryData
objects back intobyte[]
orByteBuffer
for incoming messages.
-
-
Constructor Summary
Constructors Constructor Description BinaryExtension()
BinaryExtension(boolean decodeToByteBuffer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.cometd.bayeux.client.ClientSession.Extension
incoming, outgoing, rcvMeta, sendMeta
-
-
-
-
Method Detail
-
rcv
public boolean rcv(ClientSession session, Message.Mutable message)
Description copied from interface:ClientSession.Extension
Callback method invoked every time a normal message is received.- Specified by:
rcv
in interfaceClientSession.Extension
- Parameters:
session
- the session object that is receiving the messagemessage
- the message received- Returns:
- true if message processing should continue, false if it should stop
-
send
public boolean send(ClientSession session, Message.Mutable message)
Description copied from interface:ClientSession.Extension
Callback method invoked every time a normal message is being sent.- Specified by:
send
in interfaceClientSession.Extension
- Parameters:
session
- the session object that is sending the messagemessage
- the message being sent- Returns:
- true if message processing should continue, false if it should stop
-
-