activemq-cpp-3.6.0
activemq::wireformat::openwire::marshal::PrimitiveTypesMarshaller Class Reference

This class wraps the functionality needed to marshal a primitive map to the Openwire Format's expectation of what the map looks like on the wire. More...

#include <src/main/activemq/wireformat/openwire/marshal/PrimitiveTypesMarshaller.h>

Public Member Functions

 PrimitiveTypesMarshaller ()
virtual ~PrimitiveTypesMarshaller ()

Static Public Member Functions

static void marshal (const util::PrimitiveMap *map, std::vector< unsigned char > &buffer)
 Marshal a primitive map object to the given byte buffer.
static void unmarshal (util::PrimitiveMap *map, const std::vector< unsigned char > &buffer)
 Unmarshal a PrimitiveMap from the provided Byte buffer.
static void marshal (const util::PrimitiveList *list, std::vector< unsigned char > &buffer)
 Marshal a primitive list object to the given byte buffer.
static void unmarshal (util::PrimitiveList *list, const std::vector< unsigned char > &buffer)
 Unmarshal a PrimitiveList from the provided byte buffer.
static void marshalMap (const util::PrimitiveMap *map, decaf::io::DataOutputStream &dataOut)
 Marshal a primitive map object to the given DataOutputStream.
static util::PrimitiveMapunmarshalMap (decaf::io::DataInputStream &dataIn)
 Unmarshal a PrimitiveMap from the provided DataInputStream.
static void marshalList (const util::PrimitiveList *list, decaf::io::DataOutputStream &dataOut)
 Marshal a PrimitiveList to the given DataOutputStream.
static util::PrimitiveListunmarshalList (decaf::io::DataInputStream &dataIn)
 Unmarshal a PrimitiveList from the given DataInputStream.

Static Protected Member Functions

static void marshalPrimitiveMap (decaf::io::DataOutputStream &dataOut, const decaf::util::Map< std::string, util::PrimitiveValueNode > &map)
 Marshal a Map of Primitives to the given OutputStream, can result in recursive calls to this method if the map contains maps of maps.
static void marshalPrimitiveList (decaf::io::DataOutputStream &dataOut, const decaf::util::List< util::PrimitiveValueNode > &list)
 Marshal a List of Primitives to the given OutputStream, can result in recursive calls to this method if the list contains lists of lists.
static void marshalPrimitive (decaf::io::DataOutputStream &dataOut, const util::PrimitiveValueNode &value)
 Used to Marshal the Primitive types out on the Wire.
static void unmarshalPrimitiveMap (decaf::io::DataInputStream &dataIn, util::PrimitiveMap &map)
 Unmarshals a Map of Primitives from the given InputStream, can result in recursive calls to this method if the map contains maps of maps.
static void unmarshalPrimitiveList (decaf::io::DataInputStream &dataIn, decaf::util::LinkedList< util::PrimitiveValueNode > &list)
 Unmarshals a List of Primitives from the given InputStream, can result in recursive calls to this method if the list contains lists of lists.
static util::PrimitiveValueNode unmarshalPrimitive (decaf::io::DataInputStream &dataIn)
 Unmarshals a Primitive Type from the stream, and returns it as a value Node.

Detailed Description

This class wraps the functionality needed to marshal a primitive map to the Openwire Format's expectation of what the map looks like on the wire.

Constructor & Destructor Documentation

activemq::wireformat::openwire::marshal::PrimitiveTypesMarshaller::PrimitiveTypesMarshaller ( )
inline
virtual activemq::wireformat::openwire::marshal::PrimitiveTypesMarshaller::~PrimitiveTypesMarshaller ( )
inlinevirtual

Member Function Documentation

static void activemq::wireformat::openwire::marshal::PrimitiveTypesMarshaller::marshal ( const util::PrimitiveMap map,
std::vector< unsigned char > &  buffer 
)
static

Marshal a primitive map object to the given byte buffer.

Parameters
mapMap to Marshal.
bufferThe byte buffer to write the marshaled data to.
Exceptions
Exceptionif an error occurs during the marshaling process.
static void activemq::wireformat::openwire::marshal::PrimitiveTypesMarshaller::marshal ( const util::PrimitiveList list,
std::vector< unsigned char > &  buffer 
)
static

Marshal a primitive list object to the given byte buffer.

Parameters
mapThe PrimitiveList to Marshal.
bufferThe byte buffer to write the marshaled data to.
Exceptions
Exceptionif an error occurs during the marshaling process.
static void activemq::wireformat::openwire::marshal::PrimitiveTypesMarshaller::marshalList ( const util::PrimitiveList list,
decaf::io::DataOutputStream dataOut 
)
static

Marshal a PrimitiveList to the given DataOutputStream.

Parameters
listThe list object to Marshal
dataOutReference to a DataOutputStream to write the marshaled data to.
Exceptions
Exceptionif an error occurs during the marshaling process.
static void activemq::wireformat::openwire::marshal::PrimitiveTypesMarshaller::marshalMap ( const util::PrimitiveMap map,
decaf::io::DataOutputStream dataOut 
)
static

Marshal a primitive map object to the given DataOutputStream.

Parameters
mapMap to Marshal.
dataOutReference to a DataOutputStream to write the marshaled data to.
Exceptions
Exceptionif an error occurs during the marshaling process.
static void activemq::wireformat::openwire::marshal::PrimitiveTypesMarshaller::marshalPrimitive ( decaf::io::DataOutputStream dataOut,
const util::PrimitiveValueNode value 
)
staticprotected

Used to Marshal the Primitive types out on the Wire.

Parameters
dataOut- the DataOutputStream to write to
value- the ValueNode to write.
Exceptions
IOExceptionif an I/O error occurs during this operation.
static void activemq::wireformat::openwire::marshal::PrimitiveTypesMarshaller::marshalPrimitiveList ( decaf::io::DataOutputStream dataOut,
const decaf::util::List< util::PrimitiveValueNode > &  list 
)
staticprotected

Marshal a List of Primitives to the given OutputStream, can result in recursive calls to this method if the list contains lists of lists.

Parameters
dataOut- the DataOutputStream to write to
list- the ValueNode to write.
Exceptions
IOExceptionif an I/O error occurs during this operation.
static void activemq::wireformat::openwire::marshal::PrimitiveTypesMarshaller::marshalPrimitiveMap ( decaf::io::DataOutputStream dataOut,
const decaf::util::Map< std::string, util::PrimitiveValueNode > &  map 
)
staticprotected

Marshal a Map of Primitives to the given OutputStream, can result in recursive calls to this method if the map contains maps of maps.

Parameters
dataOut- the DataOutputStream to write to
map- the ValueNode to write.
Exceptions
IOExceptionif an I/O error occurs during this operation.
static void activemq::wireformat::openwire::marshal::PrimitiveTypesMarshaller::unmarshal ( util::PrimitiveMap map,
const std::vector< unsigned char > &  buffer 
)
static

Unmarshal a PrimitiveMap from the provided Byte buffer.

Parameters
mapThe Map to populate with values from the marshaled data.
bufferThe byte buffer containing the marshaled Map.
Exceptions
Exceptionif an error occurs during the unmarshal process.
static void activemq::wireformat::openwire::marshal::PrimitiveTypesMarshaller::unmarshal ( util::PrimitiveList list,
const std::vector< unsigned char > &  buffer 
)
static

Unmarshal a PrimitiveList from the provided byte buffer.

Parameters
mapThe List to populate with values from the marshaled data.
bufferThe byte buffer containing the marshaled Map.
Exceptions
Exceptionif an error occurs during the unmarshal process.
static util::PrimitiveList* activemq::wireformat::openwire::marshal::PrimitiveTypesMarshaller::unmarshalList ( decaf::io::DataInputStream dataIn)
static

Unmarshal a PrimitiveList from the given DataInputStream.

Parameters
dataInThe DataInputStream instance to read the marshaled PrimitiveList from.
Returns
a pointer to a newly allocated PrimitiveList instnace.
Exceptions
Exceptionif an error occurs during the unmarshal process.
static util::PrimitiveMap* activemq::wireformat::openwire::marshal::PrimitiveTypesMarshaller::unmarshalMap ( decaf::io::DataInputStream dataIn)
static

Unmarshal a PrimitiveMap from the provided DataInputStream.

Parameters
dataInThe DataInputStream instance to read the marshaled PrimitiveMap from.
Returns
a pointer to a newly allocated PrimitiveMap instnace.
Exceptions
Exceptionif an error occurs during the unmarshal process.
static util::PrimitiveValueNode activemq::wireformat::openwire::marshal::PrimitiveTypesMarshaller::unmarshalPrimitive ( decaf::io::DataInputStream dataIn)
staticprotected

Unmarshals a Primitive Type from the stream, and returns it as a value Node.

Parameters
dataIn- DataInputStream to read from.
Returns
a PrimitiveValueNode containing the data.
Exceptions
IOExceptionif an I/O error occurs during this operation.
static void activemq::wireformat::openwire::marshal::PrimitiveTypesMarshaller::unmarshalPrimitiveList ( decaf::io::DataInputStream dataIn,
decaf::util::LinkedList< util::PrimitiveValueNode > &  list 
)
staticprotected

Unmarshals a List of Primitives from the given InputStream, can result in recursive calls to this method if the list contains lists of lists.

Parameters
dataIn- DataInputStream to read from.
list- the ValueNode to write.
Exceptions
IOExceptionif an I/O error occurs during this operation.
static void activemq::wireformat::openwire::marshal::PrimitiveTypesMarshaller::unmarshalPrimitiveMap ( decaf::io::DataInputStream dataIn,
util::PrimitiveMap map 
)
staticprotected

Unmarshals a Map of Primitives from the given InputStream, can result in recursive calls to this method if the map contains maps of maps.

Parameters
dataIn- DataInputStream to read from.
map- the map to fill with data.
Exceptions
IOExceptionif an I/O error occurs during this operation.

The documentation for this class was generated from the following file: