activemq-cpp-3.6.0
activemq::transport::mock::InternalCommandListener Class Reference

Listens for Commands sent from the MockTransport. More...

#include <src/main/activemq/transport/mock/InternalCommandListener.h>

Inheritance diagram for activemq::transport::mock::InternalCommandListener:

Public Member Functions

 InternalCommandListener ()
virtual ~InternalCommandListener ()
void setTransport (MockTransport *transport)
void setResponseBuilder (const Pointer< ResponseBuilder > responseBuilder)
virtual void onCommand (const Pointer< Command > command)
 Event handler for the receipt of a command.
void run ()
 Default implementation of the run method - does nothing.
- Public Member Functions inherited from activemq::transport::DefaultTransportListener
virtual ~DefaultTransportListener ()
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 ()
virtual void onException (const decaf::lang::Exception &ex)=0
 Event handler for an exception from a command transport.
- Public Member Functions inherited from decaf::lang::Thread
 Thread ()
 Constructs a new Thread.
 Thread (Runnable *task)
 Constructs a new Thread with the given target Runnable task.
 Thread (const std::string &name)
 Constructs a new Thread with the given name.
 Thread (Runnable *task, const std::string &name)
 Constructs a new Thread with the given target Runnable task and name.
 Thread (Runnable *task, const std::string &name, long long stackSize)
 Constructs a new Thread with the given target Runnable task and name.
virtual ~Thread ()
virtual void start ()
 Creates a system thread and starts it in a joinable mode.
virtual void join ()
 Forces the Current Thread to wait until the thread exits.
virtual void join (long long millisecs)
 Forces the Current Thread to wait until the thread exits.
virtual void join (long long millisecs, int nanos)
 Forces the Current Thread to wait until the thread exits.
long long getId () const
 Obtains the Thread Id of the current thread, this value is OS specific but is guaranteed not to change for the lifetime of this thread.
std::string getName () const
 Returns the Thread's assigned name.
void setName (const std::string &name)
 Sets the name of the Thread to the new Name given by the argument name
int getPriority () const
 Gets the currently set priority for this Thread.
void setPriority (int value)
 Sets the current Thread's priority to the newly specified value.
UncaughtExceptionHandlergetUncaughtExceptionHandler () const
 Set the handler invoked when this thread abruptly terminates due to an uncaught exception.
void setUncaughtExceptionHandler (UncaughtExceptionHandler *handler)
 Set the handler invoked when this thread abruptly terminates due to an uncaught exception.
std::string toString () const
 Returns a string that describes the Thread.
bool isAlive () const
 Returns true if the Thread is alive, meaning it has been started and has not yet died.
Thread::State getState () const
 Returns the currently set State of this Thread.
void interrupt ()
 Interrupts the Thread if it is blocked and in an interruptible state.
bool isInterrupted () const
 Returns but does not clear the state of this Thread's interrupted flag.
- Public Member Functions inherited from decaf::lang::Runnable
virtual ~Runnable ()

Additional Inherited Members

- Public Types inherited from decaf::lang::Thread
enum  State {
  NEW = 0, RUNNABLE = 1, BLOCKED = 2, WAITING = 3,
  TIMED_WAITING = 4, SLEEPING = 5, TERMINATED = 6
}
 Represents the various states that the Thread can be in during its lifetime. More...
- Static Public Member Functions inherited from decaf::lang::Thread
static void sleep (long long millisecs)
 Causes the currently executing thread to halt execution for the specified number of milliseconds, subject to the precision and accuracy of system timers and schedulers.
static void sleep (long long millisecs, int nanos)
 Causes the currently executing thread to halt execution for the specified number of milliseconds plus any additionally specified nanoseconds given, subject to the precision and accuracy of system timers and schedulers.
static void yield ()
 Causes the currently executing thread object to temporarily pause and allow other threads to execute.
static ThreadcurrentThread ()
 Returns a pointer to the currently executing thread object.
static bool interrupted ()
 Returns whether the thread has been interrupted and clears the interrupted state such that a subsequent call will return false unless an interrupt occurs between the two calls.
static UncaughtExceptionHandlergetDefaultUncaughtExceptionHandler ()
 Set the default handler invoked when a thread abruptly terminates due to an uncaught exception, this handler is used only if there is no other handler defined for the Thread.
static void setDefaultUncaughtExceptionHandler (UncaughtExceptionHandler *handler)
 Set the default handler invoked when a thread abruptly terminates due to an uncaught exception,.
- Static Public Attributes inherited from decaf::lang::Thread
static const int MIN_PRIORITY = 1
 The minimum priority that a thread can have.
static const int NORM_PRIORITY = 5
 The default priority that a thread is given at create time.
static const int MAX_PRIORITY = 10
 The maximum priority that a thread can have.

Detailed Description

Listens for Commands sent from the MockTransport.

This class processes all outbound commands and sends responses that are constructed by calling the Protocol provided ResponseBuilder and getting a set of Commands to send back into the MockTransport as incoming Commands and Responses.

Constructor & Destructor Documentation

activemq::transport::mock::InternalCommandListener::InternalCommandListener ( )
virtual activemq::transport::mock::InternalCommandListener::~InternalCommandListener ( )
virtual

Member Function Documentation

virtual void activemq::transport::mock::InternalCommandListener::onCommand ( const Pointer< Command > command  AMQCPP_UNUSED)
virtual

Event handler for the receipt of a command.

The transport passes off all received commands to its listeners, the listener then owns the Object. If there is no registered listener the Transport deletes the command upon receipt.

Parameters
commandthe received command object.

Reimplemented from activemq::transport::DefaultTransportListener.

void activemq::transport::mock::InternalCommandListener::run ( )
virtual

Default implementation of the run method - does nothing.

Reimplemented from decaf::lang::Thread.

void activemq::transport::mock::InternalCommandListener::setResponseBuilder ( const Pointer< ResponseBuilder responseBuilder)
inline
void activemq::transport::mock::InternalCommandListener::setTransport ( MockTransport transport)
inline

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