Public Member Functions | Private Member Functions | Private Attributes

maci::ORBTask Class Reference

#include <maciORBTask.h>

Collaboration diagram for maci::ORBTask:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 ORBTask (CORBA::ORB_ptr orb, LoggingProxy *logger=0, unsigned int timeToRun=0)

Private Member Functions

virtual int svc (void)
 Thread entry point (thread worker).

Private Attributes

CORBA::ORB_var m_orb
 CORBA ORB whose request to handle.
LoggingProxym_logger
 Logger.
unsigned int m_timeToRun
 Time to run CORBA ORB in seconds, 0 means until shutdown/destroy.

Detailed Description

Implementation of the task (set of thread workers) which will later handle CORBA requests. This implementation uses multithreaded TAO ORB design. Example of usage:

	ORBTask worker (orb.in(), m_logger);
      // activate worker
	if (worker.activate(THR_NEW_LWP | THR_JOINABLE, nthreads) == 0)
          // wait until all workers do its work, i.e. until ORB is destroyed
	    worker.thr_mgr ()->wait ();
      else
          // report error here
 

Constructor & Destructor Documentation

maci::ORBTask::ORBTask ( CORBA::ORB_ptr  orb,
LoggingProxy logger = 0,
unsigned int  timeToRun = 0 
)

Constructor of the ORBTask class.

Parameters:
orb CORBA ORB whose request to handle.
logger logger to be initialized in each thread.
timeToRun time in seconds to run CORBA ORB, 0 means until shutdown/destroy.

Member Function Documentation

virtual int maci::ORBTask::svc ( void   )  [private, virtual]

Thread entry point (thread worker).


Member Data Documentation

Logger.

CORBA::ORB_var maci::ORBTask::m_orb [private]

CORBA ORB whose request to handle.

unsigned int maci::ORBTask::m_timeToRun [private]

Time to run CORBA ORB in seconds, 0 means until shutdown/destroy.


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