activemq::concurrent::PooledThread Class Reference

#include <PooledThread.h>

Inheritance diagram for activemq::concurrent::PooledThread:

activemq::concurrent::Thread activemq::concurrent::Runnable List of all members.

Public Member Functions

 PooledThread (ThreadPool *pool)
virtual ~PooledThread (void)
virtual void run (void)
virtual void stop (void) throw ( cms::CMSException )
virtual bool isBusy (void)
virtual void setPooledThreadListener (PooledThreadListener *listener)
virtual PooledThreadListenergetPooledThreadListener (void)

Private Member Functions

 LOGCMS_DECLARE (logger)

Private Attributes

bool busy
bool done
PooledThreadListenerlistener
ThreadPoolpool

Constructor & Destructor Documentation

PooledThread::PooledThread ThreadPool pool  ) 
 

Constructor

Parameters:
pool the parant ThreadPool object

PooledThread::~PooledThread void   )  [virtual]
 


Member Function Documentation

virtual PooledThreadListener* activemq::concurrent::PooledThread::getPooledThreadListener void   )  [inline, virtual]
 

Removes a listener for this PooledThread to be notified when this thread starts and completes a task.

Returns:
a pointer to this thread's listener or NULL

virtual bool activemq::concurrent::PooledThread::isBusy void   )  [inline, virtual]
 

Checks to see if the thread is busy, if busy it means that this thread has taken a task from the ThreadPool's queue and is processing it.

Returns:
true if the Thread is busy

activemq::concurrent::PooledThread::LOGCMS_DECLARE logger   )  [private]
 

void PooledThread::run void   )  [virtual]
 

Run Method for this object waits for something to be enqueued on the ThreadPool and then grabs it and calls its run method.

Reimplemented from activemq::concurrent::Thread.

virtual void activemq::concurrent::PooledThread::setPooledThreadListener PooledThreadListener listener  )  [inline, virtual]
 

Adds a listener to this PooledThread to be notified when this thread starts and completes a task.

Parameters:
listener the listener to send notifications to.

void PooledThread::stop void   )  throw ( cms::CMSException ) [virtual]
 

Stops the Thread, thread will complete its task if currently running one, and then die. Does not block.

Exceptions:
CMSException 


Member Data Documentation

bool activemq::concurrent::PooledThread::busy [private]
 

bool activemq::concurrent::PooledThread::done [private]
 

PooledThreadListener* activemq::concurrent::PooledThread::listener [private]
 

ThreadPool* activemq::concurrent::PooledThread::pool [private]
 


The documentation for this class was generated from the following files:
Generated on Thu Aug 3 18:03:31 2006 for activemq-cpp by  doxygen 1.4.5