Package org.cometd.server.ext
Class BinaryExtension
- java.lang.Object
-
- org.cometd.server.ext.BinaryExtension
-
- All Implemented Interfaces:
BayeuxServer.Extension
public class BinaryExtension extends java.lang.Object implements BayeuxServer.Extension
A server extension that encodes
byte[]
orByteBuffer
into aBinaryData
object using theZ85
format for outgoing messages, and decodesBinaryData
objects back intobyte[]
orByteBuffer
for incoming messages.- See Also:
BinarySessionExtension
-
-
Constructor Summary
Constructors Constructor Description BinaryExtension()
BinaryExtension(boolean decodeToByteBuffer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
rcv(ServerSession from, ServerMessage.Mutable message)
Blocking version ofBayeuxServer.Extension.incoming(ServerSession, ServerMessage.Mutable, Promise)
for non-meta messages.boolean
send(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, wait
-
Methods inherited from interface org.cometd.bayeux.server.BayeuxServer.Extension
incoming, outgoing, rcvMeta, sendMeta
-
-
-
-
Method Detail
-
rcv
public boolean rcv(ServerSession from, ServerMessage.Mutable message)
Description copied from interface:BayeuxServer.Extension
Blocking version of
BayeuxServer.Extension.incoming(ServerSession, ServerMessage.Mutable, Promise)
for non-meta messages.- Specified by:
rcv
in interfaceBayeuxServer.Extension
- Parameters:
from
- the session that sent the messagemessage
- the incoming message- Returns:
- whether message processing should continue
-
send
public boolean send(ServerSession from, ServerSession to, ServerMessage.Mutable message)
Description copied from interface:BayeuxServer.Extension
Blocking version of
BayeuxServer.Extension.outgoing(ServerSession, ServerSession, ServerMessage.Mutable, Promise)
for non-meta messages.- Specified by:
send
in 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
-
-