activemq-cpp-3.6.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< FutureResponse > | asyncRequest (const Pointer< Command > command, const Pointer< ResponseCallback > responseCallback)=0 |
Sends a commands asynchronously, returning a FutureResponse object that the caller can use to check to find out the response from the broker. | |
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. | |
![]() | |
virtual | ~Closeable () |
virtual void | close ()=0 |
Closes this object and deallocates the appropriate resources. |
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 |
|
pure virtual |
Sends a commands asynchronously, returning a FutureResponse object that the caller can use to check to find out the response from the broker.
command | The Command object that is to sent out. |
responseCallback | A callback object that will be notified once a response to the command is received. |
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::mock::MockTransport, activemq::transport::IOTransport, activemq::transport::TransportFilter, activemq::transport::failover::FailoverTransport, and activemq::transport::correlator::ResponseCorrelator.
|
pure virtual |
Implemented in activemq::transport::mock::MockTransport, activemq::transport::IOTransport, activemq::transport::TransportFilter, and activemq::transport::failover::FailoverTransport.
|
pure virtual |
Gets the observer of asynchronous events from this transport.
Implemented in activemq::transport::mock::MockTransport, activemq::transport::IOTransport, activemq::transport::TransportFilter, and activemq::transport::failover::FailoverTransport.
|
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::mock::MockTransport, activemq::transport::IOTransport, activemq::transport::TransportFilter, and activemq::transport::failover::FailoverTransport.
|
pure virtual |
Has the Transport been shutdown and no longer usable.
Implemented in activemq::transport::mock::MockTransport, activemq::transport::IOTransport, activemq::transport::TransportFilter, and activemq::transport::failover::FailoverTransport.
|
pure virtual |
Is the Transport Connected to its Broker.
Implemented in activemq::transport::mock::MockTransport, activemq::transport::IOTransport, activemq::transport::TransportFilter, activemq::transport::failover::FailoverTransport, and activemq::transport::tcp::TcpTransport.
|
pure virtual |
Is this Transport fault tolerant, meaning that it will reconnect to a broker on disconnect.
Implemented in activemq::transport::mock::MockTransport, activemq::transport::IOTransport, activemq::transport::TransportFilter, activemq::transport::failover::FailoverTransport, and activemq::transport::tcp::TcpTransport.
|
pure virtual |
Implemented in activemq::transport::mock::MockTransport, activemq::transport::failover::FailoverTransport, activemq::transport::IOTransport, and activemq::transport::TransportFilter.
|
pure virtual |
Implemented in activemq::transport::mock::MockTransport, activemq::transport::failover::FailoverTransport, activemq::transport::IOTransport, and activemq::transport::TransportFilter.
|
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::mock::MockTransport, activemq::transport::IOTransport, activemq::transport::TransportFilter, and activemq::transport::failover::FailoverTransport.
|
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::mock::MockTransport, activemq::transport::IOTransport, activemq::transport::TransportFilter, activemq::transport::failover::FailoverTransport, activemq::wireformat::openwire::OpenWireFormatNegotiator, activemq::transport::inactivity::InactivityMonitor, activemq::transport::correlator::ResponseCorrelator, and activemq::transport::logging::LoggingTransport.
|
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::TransportFilter, and activemq::transport::failover::FailoverTransport.
|
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::mock::MockTransport, activemq::transport::IOTransport, activemq::transport::TransportFilter, activemq::transport::failover::FailoverTransport, activemq::wireformat::openwire::OpenWireFormatNegotiator, activemq::transport::correlator::ResponseCorrelator, and activemq::transport::logging::LoggingTransport.
|
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::mock::MockTransport, activemq::transport::IOTransport, activemq::transport::TransportFilter, activemq::transport::failover::FailoverTransport, activemq::wireformat::openwire::OpenWireFormatNegotiator, activemq::transport::correlator::ResponseCorrelator, and activemq::transport::logging::LoggingTransport.
|
pure virtual |
Sets the observer of asynchronous events from this transport.
listener | the listener of transport events. |
Implemented in activemq::transport::mock::MockTransport, activemq::transport::IOTransport, activemq::transport::TransportFilter, and activemq::transport::failover::FailoverTransport.
|
pure virtual |
Sets the WireFormat instance to use.
wireFormat | The WireFormat the object used to encode / decode commands. |
Implemented in activemq::transport::mock::MockTransport, activemq::transport::IOTransport, activemq::transport::TransportFilter, and activemq::transport::failover::FailoverTransport.
|
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::mock::MockTransport, activemq::transport::IOTransport, activemq::transport::failover::FailoverTransport, and activemq::transport::TransportFilter.
|
pure virtual |
Stops the Transport.
IOException | if an error occurs while stopping the transport. |
Implemented in activemq::transport::mock::MockTransport, activemq::transport::IOTransport, activemq::transport::failover::FailoverTransport, and activemq::transport::TransportFilter.
|
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::TransportFilter, and activemq::transport::failover::FailoverTransport.