Class BinaryExtension
java.lang.Object
org.cometd.server.ext.BinaryExtension
- All Implemented Interfaces:
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.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanrcv(ServerSession from, ServerMessage.Mutable message) Blocking version ofBayeuxServer.Extension.incoming(ServerSession, ServerMessage.Mutable, Promise)for non-meta messages.booleansend(ServerSession from, ServerSession to, ServerMessage.Mutable message) Blocking version ofBayeuxServer.Extension.outgoing(ServerSession, ServerSession, ServerMessage.Mutable, Promise)for non-meta messages.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.cometd.bayeux.server.BayeuxServer.Extension
incoming, outgoing, rcvMeta, sendMeta
-
Constructor Details
-
BinaryExtension
public BinaryExtension() -
BinaryExtension
public BinaryExtension(boolean decodeToByteBuffer)
-
-
Method Details
-
rcv
Description copied from interface:BayeuxServer.ExtensionBlocking version of
BayeuxServer.Extension.incoming(ServerSession, ServerMessage.Mutable, Promise)for non-meta messages.- Specified by:
rcvin interfaceBayeuxServer.Extension- Parameters:
from- the session that sent the messagemessage- the incoming message- Returns:
- whether message processing should continue
-
send
Description copied from interface:BayeuxServer.ExtensionBlocking version of
BayeuxServer.Extension.outgoing(ServerSession, ServerSession, ServerMessage.Mutable, Promise)for non-meta messages.- Specified by:
sendin interfaceBayeuxServer.Extension- Parameters:
from- the session that sent the message or nullto- the session the message is sent to, or null for a publish.message- the outgoing message- Returns:
- whether message processing should continue
-