activemq-cpp-3.6.0
|
Provides a mechanism to marshal commands into and out of packets or into and out of streams, Channels and Datagrams. More...
#include <src/main/activemq/wireformat/WireFormat.h>
Public Member Functions | |
virtual | ~WireFormat () |
virtual void | marshal (const Pointer< commands::Command > command, const activemq::transport::Transport *transport, decaf::io::DataOutputStream *out)=0 |
Stream based marshaling of a Command, this method blocks until the entire Command has been written out to the output stream. | |
virtual Pointer < commands::Command > | unmarshal (const activemq::transport::Transport *transport, decaf::io::DataInputStream *in)=0 |
Stream based unmarshaling, blocks on reads on the input stream until a complete command has been read and unmarshaled into the correct form. | |
virtual void | setVersion (int version)=0 |
Set the Version. | |
virtual int | getVersion () const =0 |
Get the Version. | |
virtual bool | hasNegotiator () const =0 |
Returns true if this WireFormat has a Negotiator that needs to wrap the Transport that uses it. | |
virtual bool | inReceive () const =0 |
Indicates if the WireFromat object is in the process of receiving a message. | |
virtual Pointer < transport::Transport > | createNegotiator (const Pointer< transport::Transport > transport)=0 |
If the Transport Provides a Negotiator this method will create and return a new instance of the Negotiator. |
Provides a mechanism to marshal commands into and out of packets or into and out of streams, Channels and Datagrams.
|
virtual |
|
pure virtual |
If the Transport Provides a Negotiator this method will create and return a new instance of the Negotiator.
transport | The Transport to Wrap the Negotiator around. |
UnsupportedOperationException | if the WireFormat doesn't have a Negotiator. |
Implemented in activemq::wireformat::stomp::StompWireFormat, and activemq::wireformat::openwire::OpenWireFormat.
|
pure virtual |
Get the Version.
Implemented in activemq::wireformat::openwire::OpenWireFormat, and activemq::wireformat::stomp::StompWireFormat.
|
pure virtual |
Returns true if this WireFormat has a Negotiator that needs to wrap the Transport that uses it.
Implemented in activemq::wireformat::stomp::StompWireFormat, and activemq::wireformat::openwire::OpenWireFormat.
|
pure virtual |
Indicates if the WireFromat object is in the process of receiving a message.
This is useful for monitoring inactivity and the WireFormat is processing a large message which takes longer than some configured timeout to unmarshal, the inactivity monitor can query the WireFormat instance to determine if its busy or not and not mark the connection as inactive if so.
Implemented in activemq::wireformat::openwire::OpenWireFormat, and activemq::wireformat::stomp::StompWireFormat.
|
pure virtual |
Stream based marshaling of a Command, this method blocks until the entire Command has been written out to the output stream.
command | The Command to Marshal |
transport | The Transport that called this method. |
out | The output stream to write the command to. |
IOException | if an I/O error occurs. |
Implemented in activemq::wireformat::openwire::OpenWireFormat, and activemq::wireformat::stomp::StompWireFormat.
|
pure virtual |
Set the Version.
version | the version of the wire format |
Implemented in activemq::wireformat::openwire::OpenWireFormat, and activemq::wireformat::stomp::StompWireFormat.
|
pure virtual |
Stream based unmarshaling, blocks on reads on the input stream until a complete command has been read and unmarshaled into the correct form.
Returns a Pointer to the newly unmarshaled Command.
transport | Pointer to the transport that is making this request. |
in | The input stream to read the command from. |
IOException | if an I/O error occurs. |
Implemented in activemq::wireformat::openwire::OpenWireFormat, and activemq::wireformat::stomp::StompWireFormat.