activemq-cpp-3.4.0
|
Implements a TCP/IP based transport filter, this transport is meant to wrap an instance of an IOTransport. More...
#include <src/main/activemq/transport/tcp/TcpTransport.h>
Public Member Functions | |
TcpTransport (const Pointer< Transport > &next) | |
Creates a new instance of a TcpTransport, the transport is left unconnected and is in a unusable state until the connect method is called. | |
virtual | ~TcpTransport () |
void | connect (const decaf::net::URI &uri, const decaf::util::Properties &properties) |
Creates a Socket and configures it before attempting to connect to the location specified by the URI passed in. | |
virtual void | close () |
Closes this object and deallocates the appropriate resources. | |
virtual bool | isFaultTolerant () const |
Is this Transport fault tolerant, meaning that it will reconnect to a broker on disconnect. | |
virtual bool | isConnected () const |
Is the Transport Connected to its Broker. | |
virtual bool | isClosed () const |
Has the Transport been shutdown and no longer usable. | |
Protected Member Functions | |
virtual decaf::net::Socket * | createSocket () |
Create an unconnected Socket instance to be used by the transport to communicate with the broker. | |
virtual void | configureSocket (decaf::net::Socket *socket, const decaf::util::Properties &properties) |
Using options from configuration URI, configure the socket options before the Socket instance is connected to the Server. |
Implements a TCP/IP based transport filter, this transport is meant to wrap an instance of an IOTransport.
The lower level transport should take care of managing stream reads and writes.
Creates a new instance of a TcpTransport, the transport is left unconnected and is in a unusable state until the connect method is called.
next | The next transport in the chain |
virtual activemq::transport::tcp::TcpTransport::~TcpTransport | ( | ) | [virtual] |
virtual void activemq::transport::tcp::TcpTransport::close | ( | ) | [virtual] |
Closes this object and deallocates the appropriate resources.
The object is generally no longer usable after calling close.
IOException | if an error occurs while closing. |
Reimplemented from activemq::transport::TransportFilter.
virtual void activemq::transport::tcp::TcpTransport::configureSocket | ( | decaf::net::Socket * | socket, |
const decaf::util::Properties & | properties | ||
) | [protected, virtual] |
Using options from configuration URI, configure the socket options before the Socket instance is connected to the Server.
Subclasses can override this option to set more configuration options, they should called the base class version to allow the default set of Socket options to also be configured.
socket | The Socket instance to configure using options from the given Properties. |
NullPointerException | if the Socket instance is null. |
IllegalArgumentException | if the socket instance is not handled by the class. |
SocketException | if there is an error while setting one of the Socket options. |
void activemq::transport::tcp::TcpTransport::connect | ( | const decaf::net::URI & | uri, |
const decaf::util::Properties & | properties | ||
) |
Creates a Socket and configures it before attempting to connect to the location specified by the URI passed in.
The Socket is configured using parameters in the properties that are passed to this method.
uri | The URI that the Transport is to connect to once initialized. |
properties | The Properties that have been parsed from the URI or from configuration files. |
virtual decaf::net::Socket* activemq::transport::tcp::TcpTransport::createSocket | ( | ) | [protected, virtual] |
Create an unconnected Socket instance to be used by the transport to communicate with the broker.
IOException | if there is an error while creating the unconnected Socket. |
Reimplemented in activemq::transport::tcp::SslTransport.
virtual bool activemq::transport::tcp::TcpTransport::isClosed | ( | ) | const [inline, virtual] |
Has the Transport been shutdown and no longer usable.
Reimplemented from activemq::transport::TransportFilter.
virtual bool activemq::transport::tcp::TcpTransport::isConnected | ( | ) | const [inline, virtual] |
Is the Transport Connected to its Broker.
Reimplemented from activemq::transport::TransportFilter.
virtual bool activemq::transport::tcp::TcpTransport::isFaultTolerant | ( | ) | const [inline, virtual] |
Is this Transport fault tolerant, meaning that it will reconnect to a broker on disconnect.
Reimplemented from activemq::transport::TransportFilter.