activemq-cpp-3.6.0
activemq::transport::failover::BackupTransport Class Reference

#include <src/main/activemq/transport/failover/BackupTransport.h>

Inheritance diagram for activemq::transport::failover::BackupTransport:

Public Member Functions

 BackupTransport (BackupTransportPool *failover)
virtual ~BackupTransport ()
decaf::net::URI getUri () const
 Gets the URI assigned to this Backup.
void setUri (const decaf::net::URI &uri)
 Sets the URI assigned to this Transport.
const Pointer< Transport > & getTransport ()
 Gets the currently held transport.
void setTransport (const Pointer< Transport > transport)
 Sets the held transport, if not NULL then start to listen for exceptions from the held transport.
virtual void onException (const decaf::lang::Exception &ex)
 Event handler for an exception from a command transport.
bool isClosed () const
 Has the Transport been shutdown and no longer usable.
void setClosed (bool value)
 Sets the closed flag on this Transport.
bool isPriority () const
void setPriority (bool value)
 Set if this transport is a Priority backup or not.
- Public Member Functions inherited from activemq::transport::DefaultTransportListener
virtual ~DefaultTransportListener ()
virtual void onCommand (const Pointer< Command > command AMQCPP_UNUSED)
 Event handler for the receipt of a command.
virtual void onException (const decaf::lang::Exception &ex AMQCPP_UNUSED)
 Event handler for an exception from a command transport.
virtual void transportInterrupted ()
 The transport has suffered an interruption from which it hopes to recover.
virtual void transportResumed ()
 The transport has resumed after an interruption.
- Public Member Functions inherited from activemq::transport::TransportListener
virtual ~TransportListener ()

Constructor & Destructor Documentation

activemq::transport::failover::BackupTransport::BackupTransport ( BackupTransportPool failover)
virtual activemq::transport::failover::BackupTransport::~BackupTransport ( )
virtual

Member Function Documentation

const Pointer<Transport>& activemq::transport::failover::BackupTransport::getTransport ( )
inline

Gets the currently held transport.

Returns
pointer to the held transport or NULL if not set.
decaf::net::URI activemq::transport::failover::BackupTransport::getUri ( ) const
inline

Gets the URI assigned to this Backup.

Returns
the assigned URI
bool activemq::transport::failover::BackupTransport::isClosed ( ) const
inline

Has the Transport been shutdown and no longer usable.

Returns
true if the Transport
bool activemq::transport::failover::BackupTransport::isPriority ( ) const
inline
Returns
true if this transport was in the priority backup list.
virtual void activemq::transport::failover::BackupTransport::onException ( const decaf::lang::Exception ex)
virtual

Event handler for an exception from a command transport.

The BackupTransport closes its internal Transport when an exception is received and returns the URI to the pool of URIs to attempt connections to.

Parameters
exThe exception that was passed to this listener to handle.

Implements activemq::transport::TransportListener.

void activemq::transport::failover::BackupTransport::setClosed ( bool  value)
inline

Sets the closed flag on this Transport.

Parameters
value- true for closed.
void activemq::transport::failover::BackupTransport::setPriority ( bool  value)
inline

Set if this transport is a Priority backup or not.

Parameters
valueTrue if this is a priority backup.
void activemq::transport::failover::BackupTransport::setTransport ( const Pointer< Transport transport)
inline

Sets the held transport, if not NULL then start to listen for exceptions from the held transport.

Parameters
transportThe transport to hold.

References NULL.

void activemq::transport::failover::BackupTransport::setUri ( const decaf::net::URI uri)
inline

Sets the URI assigned to this Transport.


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