activemq-cpp-3.6.0
activemq::transport::inactivity::InactivityMonitor Class Reference

#include <src/main/activemq/transport/inactivity/InactivityMonitor.h>

Inheritance diagram for activemq::transport::inactivity::InactivityMonitor:

Public Member Functions

 InactivityMonitor (const Pointer< Transport > next, const Pointer< wireformat::WireFormat > wireFormat)
 InactivityMonitor (const Pointer< Transport > next, const decaf::util::Properties &properties, const Pointer< wireformat::WireFormat > wireFormat)
virtual ~InactivityMonitor ()
virtual void onException (const decaf::lang::Exception &ex)
 Event handler for an exception from a command transport.
virtual void onCommand (const Pointer< Command > command)
 Event handler for the receipt of a command.
virtual void oneway (const Pointer< Command > command)
 Sends a one-way command.
bool isKeepAliveResponseRequired () const
void setKeepAliveResponseRequired (bool value)
long long getReadCheckTime () const
void setReadCheckTime (long long value)
long long getWriteCheckTime () const
void setWriteCheckTime (long long value)
long long getInitialDelayTime () const
void setInitialDelayTime (long long value) const
- Public Member Functions inherited from activemq::transport::TransportFilter
 TransportFilter (const Pointer< Transport > next)
 Constructor.
virtual ~TransportFilter ()
void start ()
 Starts the Transport, the send methods of a Transport will throw an exception if used before the Transport is started.
void stop ()
 Stops the Transport.
void close ()
 Closes this object and deallocates the appropriate resources.
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.
virtual Pointer< FutureResponseasyncRequest (const Pointer< Command > command, const Pointer< ResponseCallback > responseCallback)
 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< Responserequest (const Pointer< Command > command)
 Sends the given command to the broker and then waits for the response.
virtual Pointer< Responserequest (const Pointer< Command > command, unsigned int timeout)
 Sends the given command to the broker and then waits for the response.
virtual void setTransportListener (TransportListener *listener)
 Sets the observer of asynchronous events from this transport.
virtual TransportListenergetTransportListener () const
 Gets the observer of asynchronous events from this transport.
virtual Pointer
< wireformat::WireFormat
getWireFormat () const
 Gets the WireFormat instance that is in use by this transport.
virtual void setWireFormat (const Pointer< wireformat::WireFormat > wireFormat)
 Sets the WireFormat instance to use.
virtual Transportnarrow (const std::type_info &typeId)
 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
 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 isReconnectSupported () const
virtual bool isUpdateURIsSupported () const
virtual bool isClosed () const
 Has the Transport been shutdown and no longer usable.
virtual std::string getRemoteAddress () const
virtual void reconnect (const decaf::net::URI &uri)
 reconnect to another location
virtual void updateURIs (bool rebalance, const decaf::util::List< decaf::net::URI > &uris)
 Updates the set of URIs the Transport can connect to.
- Public Member Functions inherited from activemq::transport::Transport
virtual ~Transport ()
- Public Member Functions inherited from decaf::io::Closeable
virtual ~Closeable ()
- Public Member Functions inherited from activemq::transport::TransportListener
virtual ~TransportListener ()

Protected Member Functions

virtual void afterNextIsStarted ()
 Subclasses can override this method to do their own post startup work.
virtual void beforeNextIsStopped ()
 Subclasses can override this method to do their own pre-stop work.
virtual void doClose ()
 Subclasses can override this method to do their own close work.
- Protected Member Functions inherited from activemq::transport::TransportFilter
void checkClosed () const
 Throws an IOException if this filter chain has already been closed.
virtual void beforeNextIsStarted ()
 Subclasses can override this method to do their own startup work.
virtual void afterNextIsStopped ()
 Subclasses can override this method to do their own stop work.

Friends

class ReadChecker
class AsyncSignalReadErrorkTask
class WriteChecker
class AsyncWriteTask

Additional Inherited Members

- Protected Attributes inherited from activemq::transport::TransportFilter
Pointer< Transportnext
 The transport that this filter wraps around.
TransportListenerlistener
 Listener of this transport.

Constructor & Destructor Documentation

activemq::transport::inactivity::InactivityMonitor::InactivityMonitor ( const Pointer< Transport next,
const Pointer< wireformat::WireFormat wireFormat 
)
activemq::transport::inactivity::InactivityMonitor::InactivityMonitor ( const Pointer< Transport next,
const decaf::util::Properties properties,
const Pointer< wireformat::WireFormat wireFormat 
)
virtual activemq::transport::inactivity::InactivityMonitor::~InactivityMonitor ( )
virtual

Member Function Documentation

virtual void activemq::transport::inactivity::InactivityMonitor::afterNextIsStarted ( )
protectedvirtual

Subclasses can override this method to do their own post startup work.

This method will always be called after the doStart() method and the next transport's own start() methods have been successfully run.

Reimplemented from activemq::transport::TransportFilter.

virtual void activemq::transport::inactivity::InactivityMonitor::beforeNextIsStopped ( )
protectedvirtual

Subclasses can override this method to do their own pre-stop work.

This method will always be called before the next transport's own stop() method or this filter's own doStop() method is called.

Reimplemented from activemq::transport::TransportFilter.

virtual void activemq::transport::inactivity::InactivityMonitor::doClose ( )
protectedvirtual

Subclasses can override this method to do their own close work.

This method is always called after all the next transports have been closed to prevent this transport for destroying resources needed by the lower level transports.

Reimplemented from activemq::transport::TransportFilter.

long long activemq::transport::inactivity::InactivityMonitor::getInitialDelayTime ( ) const
long long activemq::transport::inactivity::InactivityMonitor::getReadCheckTime ( ) const
long long activemq::transport::inactivity::InactivityMonitor::getWriteCheckTime ( ) const
bool activemq::transport::inactivity::InactivityMonitor::isKeepAliveResponseRequired ( ) const
virtual void activemq::transport::inactivity::InactivityMonitor::onCommand ( const Pointer< Command command)
virtual

Event handler for the receipt of a command.

Parameters
command- the received command object.

Reimplemented from activemq::transport::TransportFilter.

virtual void activemq::transport::inactivity::InactivityMonitor::oneway ( const Pointer< Command command)
virtual

Sends a one-way command.

Does not wait for any response from the broker.

Parameters
commandThe command to be sent.
Exceptions
IOExceptionif an exception occurs during writing of the command.
UnsupportedOperationExceptionif this method is not implemented by this transport.

Reimplemented from activemq::transport::TransportFilter.

virtual void activemq::transport::inactivity::InactivityMonitor::onException ( const decaf::lang::Exception ex)
virtual

Event handler for an exception from a command transport.

Parameters
exThe exception to handle.

Reimplemented from activemq::transport::TransportFilter.

void activemq::transport::inactivity::InactivityMonitor::setInitialDelayTime ( long long  value) const
void activemq::transport::inactivity::InactivityMonitor::setKeepAliveResponseRequired ( bool  value)
void activemq::transport::inactivity::InactivityMonitor::setReadCheckTime ( long long  value)
void activemq::transport::inactivity::InactivityMonitor::setWriteCheckTime ( long long  value)

Friends And Related Function Documentation

friend class AsyncSignalReadErrorkTask
friend
friend class AsyncWriteTask
friend
friend class ReadChecker
friend
friend class WriteChecker
friend

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