activemq-cpp-3.6.0
activemq::commands::XATransactionId Class Reference

#include <src/main/activemq/commands/XATransactionId.h>

Inheritance diagram for activemq::commands::XATransactionId:

Public Types

typedef
decaf::lang::PointerComparator
< XATransactionId
COMPARATOR
- Public Types inherited from activemq::commands::TransactionId
typedef
decaf::lang::PointerComparator
< TransactionId
COMPARATOR

Public Member Functions

 XATransactionId ()
 XATransactionId (const XATransactionId &other)
 XATransactionId (const cms::Xid *xid)
virtual ~XATransactionId ()
virtual unsigned char getDataStructureType () const
 Get the DataStructure Type as defined in CommandTypes.h.
virtual XATransactionIdcloneDataStructure () const
 Clone this obbject and return a new instance that the caller now owns, this will be an exact copy of this one.
virtual void copyDataStructure (const DataStructure *src)
 Copy the contents of the passed object into this objects members, overwriting any existing data.
virtual std::string toString () const
 Returns a string containing the information for this DataStructure such as its type and value of its elements.
virtual bool equals (const DataStructure *value) const
 Compares the DataStructure passed in to this one, and returns if they are equivalent.
virtual bool isXATransactionId () const
virtual Xid * clone () const
 Creates a Copy of this Xid instance that contains the same id values.
virtual bool equals (const Xid *other) const
virtual int getBranchQualifier (unsigned char *buffer, int size) const
 Gets the transaction branch qualifier component of the XID.
virtual int getGlobalTransactionId (unsigned char *buffer, int size) const
 Gets the global transaction id component of the XID.
virtual int getFormatId () const
 Gets the format identifier component of the XID.
virtual void setFormatId (int formatId)
virtual const std::vector
< unsigned char > & 
getGlobalTransactionId () const
virtual std::vector< unsigned
char > & 
getGlobalTransactionId ()
virtual void setGlobalTransactionId (const std::vector< unsigned char > &globalTransactionId)
virtual const std::vector
< unsigned char > & 
getBranchQualifier () const
virtual std::vector< unsigned
char > & 
getBranchQualifier ()
virtual void setBranchQualifier (const std::vector< unsigned char > &branchQualifier)
virtual int compareTo (const XATransactionId &value) const
virtual bool equals (const XATransactionId &value) const
virtual bool operator== (const XATransactionId &value) const
virtual bool operator< (const XATransactionId &value) const
XATransactionIdoperator= (const XATransactionId &other)
- Public Member Functions inherited from activemq::commands::TransactionId
 TransactionId ()
 TransactionId (const TransactionId &other)
virtual ~TransactionId ()
virtual bool isLocalTransactionId () const
virtual int compareTo (const TransactionId &value) const
virtual bool equals (const TransactionId &value) const
virtual bool operator== (const TransactionId &value) const
virtual bool operator< (const TransactionId &value) const
TransactionIdoperator= (const TransactionId &other)
- Public Member Functions inherited from activemq::commands::BaseDataStructure
virtual ~BaseDataStructure ()
virtual bool isMarshalAware () const
 Determine if the class implementing this interface is really wanting to be told about marshaling.
virtual void beforeMarshal (wireformat::WireFormat *wireFormat AMQCPP_UNUSED)
virtual void afterMarshal (wireformat::WireFormat *wireFormat AMQCPP_UNUSED)
virtual void beforeUnmarshal (wireformat::WireFormat *wireFormat AMQCPP_UNUSED)
virtual void afterUnmarshal (wireformat::WireFormat *wireFormat AMQCPP_UNUSED)
virtual void setMarshaledForm (wireformat::WireFormat *wireFormat AMQCPP_UNUSED, const std::vector< char > &data AMQCPP_UNUSED)
virtual std::vector< unsigned
char > 
getMarshaledForm (wireformat::WireFormat *wireFormat AMQCPP_UNUSED)
virtual void copyDataStructure (const DataStructure *src AMQCPP_UNUSED)
virtual bool equals (const DataStructure *value AMQCPP_UNUSED) const
- Public Member Functions inherited from activemq::commands::DataStructure
virtual ~DataStructure ()
- Public Member Functions inherited from activemq::wireformat::MarshalAware
virtual ~MarshalAware ()
virtual void beforeMarshal (WireFormat *wireFormat)=0
 Called before marshaling is started to prepare the object to be marshaled.
virtual void afterMarshal (WireFormat *wireFormat)=0
 Called after marshaling is started to cleanup the object being marshaled.
virtual void beforeUnmarshal (WireFormat *wireFormat)=0
 Called before unmarshaling is started to prepare the object to be unmarshaled.
virtual void afterUnmarshal (WireFormat *wireFormat)=0
 Called after unmarshaling is started to cleanup the object being unmarshaled.
virtual void setMarshaledForm (WireFormat *wireFormat, const std::vector< char > &data)=0
 Called to set the data to this object that will contain the objects marshaled form.
virtual std::vector< unsigned
char > 
getMarshaledForm (WireFormat *wireFormat)=0
 Called to get the data to this object that will contain the objects marshaled form.
- Public Member Functions inherited from decaf::lang::Comparable< TransactionId >
virtual ~Comparable ()
virtual int compareTo (const TransactionId &value) const =0
 Compares this object with the specified object for order.
virtual bool equals (const TransactionId &value) const =0
virtual bool operator== (const TransactionId &value) const =0
 Compares equality between this object and the one passed.
virtual bool operator< (const TransactionId &value) const =0
 Compares this object to another and returns true if this object is considered to be less than the one passed.
- Public Member Functions inherited from cms::Xid
 Xid ()
virtual ~Xid ()
virtual bool equals (const Xid *other) const =0
 Compares this Xid to another and returns true if they are the same.
- Public Member Functions inherited from decaf::lang::Comparable< XATransactionId >
virtual ~Comparable ()
virtual int compareTo (const XATransactionId &value) const =0
 Compares this object with the specified object for order.
virtual bool equals (const XATransactionId &value) const =0
virtual bool operator== (const XATransactionId &value) const =0
 Compares equality between this object and the one passed.
virtual bool operator< (const XATransactionId &value) const =0
 Compares this object to another and returns true if this object is considered to be less than the one passed.

Static Public Attributes

static const unsigned char ID_XATRANSACTIONID = 112
- Static Public Attributes inherited from activemq::commands::TransactionId
static const unsigned char ID_TRANSACTIONID = 0
- Static Public Attributes inherited from cms::Xid
static const int MAXGTRIDSIZE
 The maximum number of bytes which will be copied into the array passed to getGlobaltransactionId().
static const int MAXBQUALSIZE
 The maximum number of bytes which will be copied into the array that is passed to getBranchQualifier().

Protected Attributes

int formatId
std::vector< unsigned char > globalTransactionId
std::vector< unsigned char > branchQualifier

Member Typedef Documentation

Constructor & Destructor Documentation

activemq::commands::XATransactionId::XATransactionId ( )
activemq::commands::XATransactionId::XATransactionId ( const XATransactionId other)
activemq::commands::XATransactionId::XATransactionId ( const cms::Xid xid)
virtual activemq::commands::XATransactionId::~XATransactionId ( )
virtual

Member Function Documentation

virtual Xid* activemq::commands::XATransactionId::clone ( ) const
virtual

Creates a Copy of this Xid instance that contains the same id values.

Returns
a new Xid instance that is equal to this one when compared.

Implements cms::Xid.

virtual XATransactionId* activemq::commands::XATransactionId::cloneDataStructure ( ) const
virtual

Clone this obbject and return a new instance that the caller now owns, this will be an exact copy of this one.

Returns
new copy of this object.

Reimplemented from activemq::commands::TransactionId.

virtual int activemq::commands::XATransactionId::compareTo ( const XATransactionId value) const
virtual
virtual void activemq::commands::XATransactionId::copyDataStructure ( const DataStructure src)
virtual

Copy the contents of the passed object into this objects members, overwriting any existing data.

Returns
src - Source Object

Reimplemented from activemq::commands::TransactionId.

virtual bool activemq::commands::XATransactionId::equals ( const DataStructure value) const
virtual

Compares the DataStructure passed in to this one, and returns if they are equivalent.

Equivalent here means that they are of the same type, and that each element of the objects are the same.

Returns
true if DataStructure's are Equal.

Reimplemented from activemq::commands::TransactionId.

virtual bool activemq::commands::XATransactionId::equals ( const Xid *  other) const
virtual
virtual bool activemq::commands::XATransactionId::equals ( const XATransactionId value) const
virtual
virtual int activemq::commands::XATransactionId::getBranchQualifier ( unsigned char *  buffer,
int  size 
) const
virtual

Gets the transaction branch qualifier component of the XID.

The value of this Xid's branch qualifier is copied into the buffer provided. If the size of the provided buffer is not large enough to accommodate the branch qualifier then no copy is performed and the method returns -1.

Parameters
bufferThe location in memory to copy the qualifier bytes to.
sizeThe size of the buffer provided.
Returns
the number of bytes copied into the buffer, or -1 if the buffer provided was not large enough.
Exceptions
XAExceptionif the size parameter is less than zero or buffer is NULL.

Implements cms::Xid.

virtual const std::vector<unsigned char>& activemq::commands::XATransactionId::getBranchQualifier ( ) const
virtual
virtual std::vector<unsigned char>& activemq::commands::XATransactionId::getBranchQualifier ( )
virtual
virtual unsigned char activemq::commands::XATransactionId::getDataStructureType ( ) const
virtual

Get the DataStructure Type as defined in CommandTypes.h.

Returns
The type of the data structure

Reimplemented from activemq::commands::TransactionId.

virtual int activemq::commands::XATransactionId::getFormatId ( ) const
virtual

Gets the format identifier component of the XID.

Returns
an integer containing the format identifier. 0 means the OSI CCR format.

Implements cms::Xid.

virtual int activemq::commands::XATransactionId::getGlobalTransactionId ( unsigned char *  buffer,
int  size 
) const
virtual

Gets the global transaction id component of the XID.

The value of this Xid's transaction id is copied into the buffer provided. If the size of the provided buffer is not large enough to accommodate the transaction id then no copy is performed and the method returns -1.

Parameters
bufferThe location in memory to copy the transaction id bytes to.
sizeThe size of the buffer provided.
Returns
the number of bytes copied into the buffer, or -1 if the buffer provided was not large enough.
Exceptions
XAExceptionif the size parameter is less than zero or buffer is NULL.

Implements cms::Xid.

virtual const std::vector<unsigned char>& activemq::commands::XATransactionId::getGlobalTransactionId ( ) const
virtual
virtual std::vector<unsigned char>& activemq::commands::XATransactionId::getGlobalTransactionId ( )
virtual
virtual bool activemq::commands::XATransactionId::isXATransactionId ( ) const
inlinevirtual

Reimplemented from activemq::commands::TransactionId.

virtual bool activemq::commands::XATransactionId::operator< ( const XATransactionId value) const
virtual
XATransactionId& activemq::commands::XATransactionId::operator= ( const XATransactionId other)
virtual bool activemq::commands::XATransactionId::operator== ( const XATransactionId value) const
virtual
virtual void activemq::commands::XATransactionId::setBranchQualifier ( const std::vector< unsigned char > &  branchQualifier)
virtual
virtual void activemq::commands::XATransactionId::setFormatId ( int  formatId)
virtual
virtual void activemq::commands::XATransactionId::setGlobalTransactionId ( const std::vector< unsigned char > &  globalTransactionId)
virtual
virtual std::string activemq::commands::XATransactionId::toString ( ) const
virtual

Returns a string containing the information for this DataStructure such as its type and value of its elements.

Returns
formatted string useful for debugging.

Reimplemented from activemq::commands::TransactionId.

Field Documentation

std::vector<unsigned char> activemq::commands::XATransactionId::branchQualifier
protected
int activemq::commands::XATransactionId::formatId
protected
std::vector<unsigned char> activemq::commands::XATransactionId::globalTransactionId
protected
const unsigned char activemq::commands::XATransactionId::ID_XATRANSACTIONID = 112
static

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