activemq-cpp-3.4.0
|
Interface for a transport layer for command objects. More...
#include <src/main/activemq/transport/Transport.h>
Public Member Functions | |
virtual | ~Transport () |
virtual void | start ()=0 |
Starts the Transport, the send methods of a Transport will throw an exception if used before the Transport is started. | |
virtual void | stop ()=0 |
Stops the Transport. | |
virtual void | oneway (const Pointer< Command > &command)=0 |
Sends a one-way command. | |
virtual Pointer< Response > | request (const Pointer< Command > &command)=0 |
Sends the given command to the broker and then waits for the response. | |
virtual Pointer< Response > | request (const Pointer< Command > &command, unsigned int timeout)=0 |
Sends the given command to the broker and then waits for the response. | |
virtual Pointer < wireformat::WireFormat > | getWireFormat () const =0 |
Gets the WireFormat instance that is in use by this transport. | |
virtual void | setWireFormat (const Pointer< wireformat::WireFormat > &wireFormat)=0 |
Sets the WireFormat instance to use. | |
virtual void | setTransportListener (TransportListener *listener)=0 |
Sets the observer of asynchronous events from this transport. | |
virtual TransportListener * | getTransportListener () const =0 |
Gets the observer of asynchronous events from this transport. | |
virtual Transport * | narrow (const std::type_info &typeId)=0 |
Narrows down a Chain of Transports to a specific Transport to allow a higher level transport to skip intermediate Transports in certain circumstances. | |
virtual bool | isFaultTolerant () const =0 |
Is this Transport fault tolerant, meaning that it will reconnect to a broker on disconnect. | |
virtual bool | isConnected () const =0 |
Is the Transport Connected to its Broker. | |
virtual bool | isClosed () const =0 |
Has the Transport been shutdown and no longer usable. | |
virtual bool | isReconnectSupported () const =0 |
virtual bool | isUpdateURIsSupported () const =0 |
virtual std::string | getRemoteAddress () const =0 |
virtual void | reconnect (const decaf::net::URI &uri)=0 |
reconnect to another location | |
virtual void | updateURIs (bool rebalance, const decaf::util::List< decaf::net::URI > &uris)=0 |
Updates the set of URIs the Transport can connect to. |
Interface for a transport layer for command objects.
Callers can send oneway messages or make synchronous requests. Non-response messages will be delivered to the specified listener object upon receipt. A user of the Transport can set an exception listener to be notified of errors that occurs in Threads that the Transport layer runs. Transports should be given an instance of a WireFormat object when created so that they can turn the built in Commands to / from the required wire format encoding.
virtual activemq::transport::Transport::~Transport | ( | ) | [inline, virtual] |
virtual std::string activemq::transport::Transport::getRemoteAddress | ( | ) | const [pure virtual] |
Implemented in activemq::transport::failover::FailoverTransport, activemq::transport::IOTransport, activemq::transport::mock::MockTransport, and activemq::transport::TransportFilter.
virtual TransportListener* activemq::transport::Transport::getTransportListener | ( | ) | const [pure virtual] |
Gets the observer of asynchronous events from this transport.
Implemented in activemq::transport::failover::FailoverTransport, activemq::transport::IOTransport, activemq::transport::mock::MockTransport, and activemq::transport::TransportFilter.
virtual Pointer<wireformat::WireFormat> activemq::transport::Transport::getWireFormat | ( | ) | const [pure virtual] |
Gets the WireFormat instance that is in use by this transport.
In the case of nested transport this method delegates down to the lowest level transport that actually maintains a WireFormat info instance.
Implemented in activemq::transport::failover::FailoverTransport, activemq::transport::IOTransport, activemq::transport::mock::MockTransport, and activemq::transport::TransportFilter.
virtual bool activemq::transport::Transport::isClosed | ( | ) | const [pure virtual] |
Has the Transport been shutdown and no longer usable.
Implemented in activemq::transport::failover::FailoverTransport, activemq::transport::IOTransport, activemq::transport::mock::MockTransport, activemq::transport::tcp::TcpTransport, and activemq::transport::TransportFilter.
virtual bool activemq::transport::Transport::isConnected | ( | ) | const [pure virtual] |
Is the Transport Connected to its Broker.
Implemented in activemq::transport::failover::FailoverTransport, activemq::transport::IOTransport, activemq::transport::mock::MockTransport, activemq::transport::tcp::TcpTransport, and activemq::transport::TransportFilter.
virtual bool activemq::transport::Transport::isFaultTolerant | ( | ) | const [pure virtual] |
Is this Transport fault tolerant, meaning that it will reconnect to a broker on disconnect.
Implemented in activemq::transport::failover::FailoverTransport, activemq::transport::IOTransport, activemq::transport::mock::MockTransport, activemq::transport::tcp::TcpTransport, and activemq::transport::TransportFilter.
virtual bool activemq::transport::Transport::isReconnectSupported | ( | ) | const [pure virtual] |
Implemented in activemq::transport::failover::FailoverTransport, activemq::transport::IOTransport, activemq::transport::mock::MockTransport, and activemq::transport::TransportFilter.
virtual bool activemq::transport::Transport::isUpdateURIsSupported | ( | ) | const [pure virtual] |
Implemented in activemq::transport::failover::FailoverTransport, activemq::transport::IOTransport, activemq::transport::mock::MockTransport, and activemq::transport::TransportFilter.
virtual Transport* activemq::transport::Transport::narrow | ( | const std::type_info & | typeId | ) | [pure virtual] |
Narrows down a Chain of Transports to a specific Transport to allow a higher level transport to skip intermediate Transports in certain circumstances.
typeId | - The type_info of the Object we are searching for. |
Implemented in activemq::transport::failover::FailoverTransport, activemq::transport::IOTransport, activemq::transport::mock::MockTransport, and activemq::transport::TransportFilter.
virtual void activemq::transport::Transport::oneway | ( | const Pointer< Command > & | command | ) | [pure virtual] |
Sends a one-way command.
Does not wait for any response from the broker.
command | The command to be sent. |
IOException | if an exception occurs during writing of the command. |
UnsupportedOperationException | if this method is not implemented by this transport. |
Implemented in activemq::transport::correlator::ResponseCorrelator, activemq::transport::failover::FailoverTransport, activemq::transport::inactivity::InactivityMonitor, activemq::transport::IOTransport, activemq::transport::logging::LoggingTransport, activemq::transport::mock::MockTransport, activemq::transport::TransportFilter, and activemq::wireformat::openwire::OpenWireFormatNegotiator.
virtual void activemq::transport::Transport::reconnect | ( | const decaf::net::URI & | uri | ) | [pure virtual] |
reconnect to another location
uri | The new URI to connect this Transport to. |
IOException | on failure or if reconnect is not supported. |
Implemented in activemq::transport::failover::FailoverTransport, and activemq::transport::TransportFilter.
virtual Pointer<Response> activemq::transport::Transport::request | ( | const Pointer< Command > & | command | ) | [pure virtual] |
Sends the given command to the broker and then waits for the response.
command | the command to be sent. |
IOException | if an exception occurs during the read of the command. |
UnsupportedOperationException | if this method is not implemented by this transport. |
Implemented in activemq::transport::correlator::ResponseCorrelator, activemq::transport::failover::FailoverTransport, activemq::transport::IOTransport, activemq::transport::logging::LoggingTransport, activemq::transport::mock::MockTransport, activemq::transport::TransportFilter, and activemq::wireformat::openwire::OpenWireFormatNegotiator.
virtual Pointer<Response> activemq::transport::Transport::request | ( | const Pointer< Command > & | command, |
unsigned int | timeout | ||
) | [pure virtual] |
Sends the given command to the broker and then waits for the response.
command | The command to be sent. |
timeout | The time to wait for this response. |
IOException | if an exception occurs during the read of the command. |
UnsupportedOperationException | if this method is not implemented by this transport. |
Implemented in activemq::transport::correlator::ResponseCorrelator, activemq::transport::failover::FailoverTransport, activemq::transport::IOTransport, activemq::transport::logging::LoggingTransport, activemq::transport::mock::MockTransport, activemq::transport::TransportFilter, and activemq::wireformat::openwire::OpenWireFormatNegotiator.
virtual void activemq::transport::Transport::setTransportListener | ( | TransportListener * | listener | ) | [pure virtual] |
Sets the observer of asynchronous events from this transport.
listener | the listener of transport events. |
Implemented in activemq::transport::failover::FailoverTransport, activemq::transport::IOTransport, activemq::transport::mock::MockTransport, and activemq::transport::TransportFilter.
virtual void activemq::transport::Transport::setWireFormat | ( | const Pointer< wireformat::WireFormat > & | wireFormat | ) | [pure virtual] |
Sets the WireFormat instance to use.
wireFormat | The WireFormat the object used to encode / decode commands. |
Implemented in activemq::transport::IOTransport, and activemq::transport::TransportFilter.
virtual void activemq::transport::Transport::start | ( | ) | [pure virtual] |
Starts the Transport, the send methods of a Transport will throw an exception if used before the Transport is started.
IOException | if and error occurs while starting the Transport. |
Implemented in activemq::transport::correlator::ResponseCorrelator, activemq::transport::failover::FailoverTransport, activemq::transport::IOTransport, activemq::transport::mock::MockTransport, activemq::transport::TransportFilter, and activemq::wireformat::openwire::OpenWireFormatNegotiator.
virtual void activemq::transport::Transport::stop | ( | ) | [pure virtual] |
Stops the Transport.
IOException | if an error occurs while stopping the transport. |
Implemented in activemq::transport::failover::FailoverTransport, activemq::transport::IOTransport, activemq::transport::mock::MockTransport, and activemq::transport::TransportFilter.
virtual void activemq::transport::Transport::updateURIs | ( | bool | rebalance, |
const decaf::util::List< decaf::net::URI > & | uris | ||
) | [pure virtual] |
Updates the set of URIs the Transport can connect to.
If the Transport doesn't support updating its URIs then an IOException is thrown.
rebalance | Indicates if a forced reconnection should be performed as a result of the update. |
uris | The new list of URIs that can be used for connection. |
IOException | if an error occurs or updates aren't supported. |
Implemented in activemq::transport::failover::FailoverTransport, and activemq::transport::TransportFilter.