activemq-cpp-3.6.0
|
Base class for all Marshallers that marshal DataStructures to and from the wire using the OpenWire protocol. More...
#include <src/main/activemq/wireformat/openwire/marshal/BaseDataStreamMarshaller.h>
Public Member Functions | |
virtual | ~BaseDataStreamMarshaller () |
virtual int | tightMarshal1 (OpenWireFormat *format AMQCPP_UNUSED, commands::DataStructure *command AMQCPP_UNUSED, utils::BooleanStream *bs AMQCPP_UNUSED) |
Tight Marhsal to the given stream. | |
virtual void | tightMarshal2 (OpenWireFormat *format AMQCPP_UNUSED, commands::DataStructure *command AMQCPP_UNUSED, decaf::io::DataOutputStream *ds AMQCPP_UNUSED, utils::BooleanStream *bs AMQCPP_UNUSED) |
Tight Marshal to the given stream. | |
virtual void | tightUnmarshal (OpenWireFormat *format AMQCPP_UNUSED, commands::DataStructure *command AMQCPP_UNUSED, decaf::io::DataInputStream *dis AMQCPP_UNUSED, utils::BooleanStream *bs AMQCPP_UNUSED) |
Tight Un-Marshal to the given stream. | |
virtual void | looseMarshal (OpenWireFormat *format AMQCPP_UNUSED, commands::DataStructure *command AMQCPP_UNUSED, decaf::io::DataOutputStream *ds AMQCPP_UNUSED) |
Tight Marshal to the given stream. | |
virtual void | looseUnmarshal (OpenWireFormat *format AMQCPP_UNUSED, commands::DataStructure *command AMQCPP_UNUSED, decaf::io::DataInputStream *dis AMQCPP_UNUSED) |
Loose Un-Marshal to the given stream. | |
Public Member Functions inherited from activemq::wireformat::openwire::marshal::DataStreamMarshaller | |
virtual | ~DataStreamMarshaller () |
virtual unsigned char | getDataStructureType () const =0 |
Gets the DataStructureType that this class marshals/unmarshals. | |
virtual commands::DataStructure * | createObject () const =0 |
Creates a new instance of the class that this class is a marshaling director for. | |
virtual int | tightMarshal1 (OpenWireFormat *format, commands::DataStructure *command, utils::BooleanStream *bs)=0 |
Tight Marhsal to the given stream. | |
virtual void | tightMarshal2 (OpenWireFormat *format, commands::DataStructure *command, decaf::io::DataOutputStream *ds, utils::BooleanStream *bs)=0 |
Tight Marhsal to the given stream. | |
virtual void | tightUnmarshal (OpenWireFormat *format, commands::DataStructure *command, decaf::io::DataInputStream *dis, utils::BooleanStream *bs)=0 |
Tight Un-marhsal to the given stream. | |
virtual void | looseMarshal (OpenWireFormat *format, commands::DataStructure *command, decaf::io::DataOutputStream *ds)=0 |
Tight Marhsal to the given stream. | |
virtual void | looseUnmarshal (OpenWireFormat *format, commands::DataStructure *command, decaf::io::DataInputStream *dis)=0 |
Loose Un-marhsal to the given stream. |
Static Public Member Functions | |
static std::string | toString (const commands::MessageId *id) |
Converts the object to a String. | |
static std::string | toString (const commands::ProducerId *id) |
Converts the object to a String. | |
static std::string | toString (const commands::TransactionId *txnId) |
Converts the given transaction ID into a String. | |
static std::string | toHexFromBytes (const std::vector< unsigned char > &data) |
given an array of bytes, convert that array to a Hexidecimal coded string that represents that data. |
Protected Member Functions | |
virtual commands::DataStructure * | tightUnmarshalCachedObject (OpenWireFormat *wireFormat, decaf::io::DataInputStream *dataIn, utils::BooleanStream *bs) |
Tight Unmarshal the cached object. | |
virtual int | tightMarshalCachedObject1 (OpenWireFormat *wireFormat, commands::DataStructure *data, utils::BooleanStream *bs) |
Tightly marshals the passed DataStructure based object to the passed BooleanStream returning the size of the data marshaled. | |
virtual void | tightMarshalCachedObject2 (OpenWireFormat *wireFormat, commands::DataStructure *data, decaf::io::DataOutputStream *dataOut, utils::BooleanStream *bs) |
Tightly marshals the passed DataStructure based object to the passed streams returning nothing. | |
virtual void | looseMarshalCachedObject (OpenWireFormat *wireFormat, commands::DataStructure *data, decaf::io::DataOutputStream *dataOut) |
Loosely marshals the passed DataStructure based object to the passed stream returning nothing. | |
virtual commands::DataStructure * | looseUnmarshalCachedObject (OpenWireFormat *wireFormat, decaf::io::DataInputStream *dataIn) |
Loose Unmarshal the cached object. | |
virtual int | tightMarshalNestedObject1 (OpenWireFormat *wireFormat, commands::DataStructure *object, utils::BooleanStream *bs) |
Tightly marshals the passed DataStructure based object to the passed BooleanStream returning the size of the data marshaled. | |
virtual void | tightMarshalNestedObject2 (OpenWireFormat *wireFormat, commands::DataStructure *object, decaf::io::DataOutputStream *dataOut, utils::BooleanStream *bs) |
Tightly marshals the passed DataStructure based object to the passed streams returning nothing. | |
virtual commands::DataStructure * | tightUnmarshalNestedObject (OpenWireFormat *wireFormat, decaf::io::DataInputStream *dataIn, utils::BooleanStream *bs) |
Tight Unmarshal the nested object. | |
virtual commands::DataStructure * | looseUnmarshalNestedObject (OpenWireFormat *wireFormat, decaf::io::DataInputStream *dataIn) |
Loose Unmarshal the nested object. | |
virtual void | looseMarshalNestedObject (OpenWireFormat *wireFormat, commands::DataStructure *object, decaf::io::DataOutputStream *dataOut) |
Loose marshall the nested object. | |
virtual std::string | tightUnmarshalString (decaf::io::DataInputStream *dataIn, utils::BooleanStream *bs) |
Performs Tight Unmarshaling of String Objects. | |
virtual int | tightMarshalString1 (const std::string &value, utils::BooleanStream *bs) |
Tight Marshals the String to a Booleans Stream Object, returns the marshaled size. | |
virtual void | tightMarshalString2 (const std::string &value, decaf::io::DataOutputStream *dataOut, utils::BooleanStream *bs) |
Tight Marshals the passed string to the streams passed. | |
virtual void | looseMarshalString (const std::string value, decaf::io::DataOutputStream *dataOut) |
Loose Marshal the String to the DataOuputStream passed. | |
virtual std::string | looseUnmarshalString (decaf::io::DataInputStream *dataIn) |
Loose Un-Marshal the String to the DataOuputStream passed. | |
virtual int | tightMarshalLong1 (OpenWireFormat *wireFormat, long long value, utils::BooleanStream *bs) |
Tightly marshal the long long to the BooleanStream passed. | |
virtual void | tightMarshalLong2 (OpenWireFormat *wireFormat, long long value, decaf::io::DataOutputStream *dataOut, utils::BooleanStream *bs) |
Tightly marshal the long long to the Streams passed. | |
virtual long long | tightUnmarshalLong (OpenWireFormat *wireFormat, decaf::io::DataInputStream *dataIn, utils::BooleanStream *bs) |
Tight marshal the long long type. | |
virtual void | looseMarshalLong (OpenWireFormat *wireFormat, long long value, decaf::io::DataOutputStream *dataOut) |
Tightly marshal the long long to the BooleanStream passed. | |
virtual long long | looseUnmarshalLong (OpenWireFormat *wireFormat, decaf::io::DataInputStream *dataIn) |
Loose marshal the long long type. | |
virtual std::vector< unsigned char > | tightUnmarshalByteArray (decaf::io::DataInputStream *dataIn, utils::BooleanStream *bs) |
Tight Unmarshal an array of char. | |
virtual std::vector< unsigned char > | looseUnmarshalByteArray (decaf::io::DataInputStream *dataIn) |
Loose Unmarshal an array of char. | |
virtual std::vector< unsigned char > | tightUnmarshalConstByteArray (decaf::io::DataInputStream *dataIn, utils::BooleanStream *bs, int size) |
Tight Unmarshal a fixed size array from that data input stream and return an stl vector of char as the resultant. | |
virtual std::vector< unsigned char > | looseUnmarshalConstByteArray (decaf::io::DataInputStream *dataIn, int size) |
Tight Unmarshal a fixed size array from that data input stream and return an stl vector of char as the resultant. | |
virtual commands::DataStructure * | tightUnmarshalBrokerError (OpenWireFormat *wireFormat, decaf::io::DataInputStream *dataIn, utils::BooleanStream *bs) |
Tight Unarshall the Error object. | |
virtual int | tightMarshalBrokerError1 (OpenWireFormat *wireFormat, commands::DataStructure *data, utils::BooleanStream *bs) |
Tight Marshal the Error object. | |
virtual void | tightMarshalBrokerError2 (OpenWireFormat *wireFormat, commands::DataStructure *data, decaf::io::DataOutputStream *dataOut, utils::BooleanStream *bs) |
Tight Marshal the Error object. | |
virtual commands::DataStructure * | looseUnmarshalBrokerError (OpenWireFormat *wireFormat, decaf::io::DataInputStream *dataIn) |
Loose Unarshal the Error object. | |
virtual void | looseMarshalBrokerError (OpenWireFormat *wireFormat, commands::DataStructure *data, decaf::io::DataOutputStream *dataOut) |
Tight Marshal the Error object. | |
template<typename T > | |
int | tightMarshalObjectArray1 (OpenWireFormat *wireFormat, std::vector< T > objects, utils::BooleanStream *bs) |
Tightly Marshal an array of DataStructure objects to the provided boolean stream, and return the size that the tight marshalling is going to take. | |
template<typename T > | |
void | tightMarshalObjectArray2 (OpenWireFormat *wireFormat, std::vector< T > objects, decaf::io::DataOutputStream *dataOut, utils::BooleanStream *bs) |
Tightly Marshal an array of DataStructure objects to the provided boolean stream and data output stream. | |
template<typename T > | |
void | looseMarshalObjectArray (OpenWireFormat *wireFormat, std::vector< T > objects, decaf::io::DataOutputStream *dataOut) |
Loosely Marshal an array of DataStructure objects to the provided boolean stream and data output stream. | |
virtual std::string | readAsciiString (decaf::io::DataInputStream *dataIn) |
Given an DataInputStream read a know ASCII formatted string from the input and return that string. |
Base class for all Marshallers that marshal DataStructures to and from the wire using the OpenWire protocol.
|
inlinevirtual |
|
inlinevirtual |
Tight Marshal to the given stream.
format | - The OpenwireFormat properties |
command | - the object to Marshal |
ds | - DataOutputStream to marshal to |
IOException | if an error occurs. |
|
protectedvirtual |
Tight Marshal the Error object.
wireFormat | - The OpenwireFormat properties |
data | - Error to Marshal |
dataOut | - stream to write marshalled data to |
IOException | if an error occurs. |
|
protectedvirtual |
Loosely marshals the passed DataStructure based object to the passed stream returning nothing.
wireFormat | - The OpenwireFormat properties |
data | - DataStructure Object Pointer to marshal |
dataOut | - stream to write marshaled data to |
IOException | if an error occurs. |
|
protectedvirtual |
Tightly marshal the long long to the BooleanStream passed.
wireFormat | - The OpenwireFormat properties |
value | - long long to marshal |
dataOut | - DataOutputStream to marshal to. |
IOException | if an error occurs. |
|
protectedvirtual |
Loose marshall the nested object.
wireFormat | - The OpenwireFormat properties |
object | - DataStructure Object Pointer to marshal |
dataOut | - stream to write marshaled data to |
IOException | if an error occurs. |
|
inlineprotected |
Loosely Marshal an array of DataStructure objects to the provided boolean stream and data output stream.
wireFormat | - The OpenwireFormat properties |
objects | - array of DataStructure object pointers. |
dataOut | - stream to write marshalled data to |
IOException | if an error occurs. |
References AMQ_CATCH_EXCEPTION_CONVERT, AMQ_CATCH_RETHROW, AMQ_CATCHALL_THROW, decaf::io::DataOutputStream::writeBoolean(), and decaf::io::DataOutputStream::writeShort().
|
protectedvirtual |
Loose Marshal the String to the DataOuputStream passed.
value | - string to marshal |
dataOut | - stream to write marshaled form to |
IOException | if an error occurs. |
|
inlinevirtual |
Loose Un-Marshal to the given stream.
format | - The OpenwireFormat properties |
command | - the object to Un-Marshal |
dis | - the DataInputStream to Un-Marshal from |
IOException | if an error occurs. |
|
protectedvirtual |
Loose Unarshal the Error object.
wireFormat | - The OpenwireFormat properties |
dataIn | - stream to read marshalled form from |
IOException | if an error occurs. |
|
protectedvirtual |
Loose Unmarshal an array of char.
dataIn | - the DataInputStream to Un-Marshal from |
IOException | if an error occurs. |
|
protectedvirtual |
Loose Unmarshal the cached object.
wireFormat | - The OpenwireFormat properties |
dataIn | - stream to read marshaled form from |
IOException | if an error occurs. |
|
protectedvirtual |
Tight Unmarshal a fixed size array from that data input stream and return an stl vector of char as the resultant.
dataIn | - the DataInputStream to Un-Marshal from |
size | - size of the const array to unmarshal |
IOException | if an error occurs. |
|
protectedvirtual |
Loose marshal the long long type.
wireFormat | - The OpenwireFormat properties |
dataIn | - stream to read marshaled form from |
IOException | if an error occurs. |
|
protectedvirtual |
Loose Unmarshal the nested object.
wireFormat | - The OpenwireFormat properties |
dataIn | - stream to read marshaled form from |
IOException | if an error occurs. |
|
protectedvirtual |
Loose Un-Marshal the String to the DataOuputStream passed.
dataIn | - stream to read marshaled form from |
IOException | if an error occurs. |
|
protectedvirtual |
Given an DataInputStream read a know ASCII formatted string from the input and return that string.
dataIn | - DataInputStream to read from |
|
inlinevirtual |
Tight Marhsal to the given stream.
format | - The OpenwireFormat properties |
command | - the object to Marshal |
bs | - boolean stream to marshal to. |
IOException | if an error occurs. |
|
inlinevirtual |
Tight Marshal to the given stream.
format | - The OpenwireFormat properties |
command | - the object to Marshal |
ds | - the DataOutputStream to Marshal to |
bs | - boolean stream to marshal to. |
IOException | if an error occurs. |
|
protectedvirtual |
Tight Marshal the Error object.
wireFormat | - The OpenwireFormat properties |
data | - Error to Marshal |
bs | - boolean stream to marshal to. |
IOException | if an error occurs. |
|
protectedvirtual |
Tight Marshal the Error object.
wireFormat | - The OpenwireFormat properties |
data | - Error to Marshal |
dataOut | - stream to write marshalled data to |
bs | - boolean stream to marshal to. |
IOException | if an error occurs. |
|
protectedvirtual |
Tightly marshals the passed DataStructure based object to the passed BooleanStream returning the size of the data marshaled.
wireFormat | - The OpenwireFormat properties |
data | - DataStructure Object Pointer to marshal |
bs | - boolean stream to marshal to. |
IOException | if an error occurs. |
|
protectedvirtual |
Tightly marshals the passed DataStructure based object to the passed streams returning nothing.
wireFormat | - The OpenwireFormat properties |
data | - DataStructure Object Pointer to marshal |
bs | - boolean stream to marshal to. |
dataOut | - stream to write marshaled data to |
IOException | if an error occurs. |
|
protectedvirtual |
Tightly marshal the long long to the BooleanStream passed.
wireFormat | - The OpenwireFormat properties |
value | - long long to marshal |
bs | - boolean stream to marshal to. |
IOException | if an error occurs. |
|
protectedvirtual |
Tightly marshal the long long to the Streams passed.
wireFormat | - The OpenwireFormat properties |
value | - long long to marshal |
dataOut | - stream to write marshaled form to |
bs | - boolean stream to marshal to. |
IOException | if an error occurs. |
|
protectedvirtual |
Tightly marshals the passed DataStructure based object to the passed BooleanStream returning the size of the data marshaled.
wireFormat | - The OpenwireFormat properties |
object | - DataStructure Object Pointer to marshal |
bs | - boolean stream to marshal to. |
IOException | if an error occurs. |
|
protectedvirtual |
Tightly marshals the passed DataStructure based object to the passed streams returning nothing.
wireFormat | - The OpenwireFormat properties |
object | - DataStructure Object Pointer to marshal |
bs | - boolean stream to marshal to. |
dataOut | - stream to write marshaled data to |
IOException | if an error occurs. |
|
inlineprotected |
Tightly Marshal an array of DataStructure objects to the provided boolean stream, and return the size that the tight marshalling is going to take.
wireFormat | - The OpenwireFormat properties |
objects | - array of DataStructure object pointers. |
bs | - boolean stream to marshal to. |
IOException | if an error occurs. |
References AMQ_CATCH_EXCEPTION_CONVERT, AMQ_CATCH_RETHROW, AMQ_CATCHALL_THROW, and activemq::wireformat::openwire::utils::BooleanStream::writeBoolean().
|
inlineprotected |
Tightly Marshal an array of DataStructure objects to the provided boolean stream and data output stream.
wireFormat | - The OpenwireFormat properties |
objects | - array of DataStructure object pointers. |
dataOut | - stream to write marshalled data to |
bs | - boolean stream to marshal to. |
IOException | if an error occurs. |
References AMQ_CATCH_EXCEPTION_CONVERT, AMQ_CATCH_RETHROW, AMQ_CATCHALL_THROW, activemq::wireformat::openwire::utils::BooleanStream::readBoolean(), and decaf::io::DataOutputStream::writeShort().
|
protectedvirtual |
Tight Marshals the String to a Booleans Stream Object, returns the marshaled size.
value | - string to marshal |
bs | - BooleanStream to use. |
IOException | if an error occurs. |
|
protectedvirtual |
Tight Marshals the passed string to the streams passed.
value | - string to marshal |
dataOut | - the DataOutputStream to Marshal to |
bs | - boolean stream to marshal to. |
IOException | if an error occurs. |
|
inlinevirtual |
Tight Un-Marshal to the given stream.
format | - The OpenwireFormat properties |
command | - the object to Un-Marshal |
dis | - the DataInputStream to Un-Marshal from |
bs | - boolean stream to Un-Marshal from. |
IOException | if an error occurs. |
|
protectedvirtual |
Tight Unarshall the Error object.
wireFormat | - The OpenwireFormat properties |
dataIn | - stream to read marshalled form from |
bs | - boolean stream to marshal to. |
IOException | if an error occurs. |
|
protectedvirtual |
Tight Unmarshal an array of char.
dataIn | - the DataInputStream to Un-Marshal from |
bs | - boolean stream to unmarshal from. |
IOException | if an error occurs. |
|
protectedvirtual |
Tight Unmarshal the cached object.
wireFormat | - The OpenwireFormat properties |
dataIn | - stream to read marshaled form from |
bs | - boolean stream to marshal to. |
IOException | if an error occurs. |
|
protectedvirtual |
Tight Unmarshal a fixed size array from that data input stream and return an stl vector of char as the resultant.
dataIn | - the DataInputStream to Un-Marshal from |
bs | - boolean stream to unmarshal from. |
size | - size of the const array to unmarshal |
IOException | if an error occurs. |
|
protectedvirtual |
Tight marshal the long long type.
wireFormat | - The OpenwireFormat properties |
dataIn | - stream to read marshaled form from |
bs | - boolean stream to marshal to. |
IOException | if an error occurs. |
|
protectedvirtual |
Tight Unmarshal the nested object.
wireFormat | - The OpenwireFormat properties |
dataIn | - stream to read marshaled form from |
bs | - boolean stream to marshal to. |
IOException | if an error occurs. |
|
protectedvirtual |
Performs Tight Unmarshaling of String Objects.
dataIn | - the DataInputStream to Un-Marshal from |
bs | - boolean stream to unmarshal from. |
IOException | if an error occurs. |
|
static |
given an array of bytes, convert that array to a Hexidecimal coded string that represents that data.
data | - unsigned char data array pointer |
|
static |
Converts the object to a String.
id | - MessageId pointer |
Referenced by activemq::commands::ActiveMQMessageTemplate< cms::ObjectMessage >::getCMSMessageID().
|
static |
Converts the object to a String.
id | - ProducerId pointer |
|
static |
Converts the given transaction ID into a String.
txnId | - TransactionId poitner |