Main Page | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages

ThreadedOrbRunStrategy Class Reference

#include <ThreadedOrbRunStrategy.h>

Inheritance diagram for ThreadedOrbRunStrategy:

OrbRunStrategy List of all members.

Detailed Description

Calls ORB::run with a configurable number of threads.

Inspired by TAO's lack of built in support for multiple threads. This strategy calls ORB::run from multiple threads. The number of threads used is configurable with -BPtorbstrat_himark. Use the -BPthdstrategy=mtorbrun command line option to activate the ThreadedOrbRunStrategy

See Thread Model Configuration for more information

Author:
Author
knoxy
Version:
Revision
1.3
Date:
Date
2004/11/12 03:53:19


Public Member Functions

 ThreadedOrbRunStrategy ()
virtual ~ThreadedOrbRunStrategy ()
virtual void _apply (SysHook *sys_hook, ConfMap &config) throw (std::logic_error, std::runtime_error, CORBA::SystemException )
virtual void orb_run ()
virtual bool apply (SysHook *sys_hook, ConfMap &config) throw (std::logic_error, std::runtime_error, CORBA::SystemException )
void interrupt (bool state)
bool interrupted ()


Constructor & Destructor Documentation

ThreadedOrbRunStrategy::ThreadedOrbRunStrategy  )  [inline]
 

ctor

virtual ThreadedOrbRunStrategy::~ThreadedOrbRunStrategy  )  [inline, virtual]
 

dtor


Member Function Documentation

virtual void ThreadedOrbRunStrategy::_apply SysHook sys_hook,
ConfMap config
throw (std::logic_error, std::runtime_error, CORBA::SystemException ) [virtual]
 

Implement OrbRunStrategy contract

Parameters:
sys_hook - Accessor to system resources like the ORB and POA
config - The System configuration parameter map
Returns:
True if the ORB exits without exception, false otherwise
Exceptions:
std::logic_error - A Strategy implementation can throw domain_error, invalid_argument, length_error, out_of_range
std::runtime_error - A Strategy implementation can also throw range_error, overflow_error, underflow_error.
CORBA::SystemException 

Implements OrbRunStrategy.

virtual bool OrbRunStrategy::apply SysHook sys_hook,
ConfMap config
throw (std::logic_error, std::runtime_error, CORBA::SystemException ) [virtual, inherited]
 

The public OrbRunStrategy contract

Does some basic configuration and starts a signal catcher thread, then calls out to the protected virtual _apply. This is an implementation of the GoF Template Method pattern.

Note:
The operation is protected by a mutex, including the call out to the protected virtual _apply.
Parameters:
sys_hook - Accessor to system resources like the ORB and POA
config - The System configuration parameter map
Returns:
True if the ORB exits without exception, false otherwise
Exceptions:
std::logic_error - A Strategy implementation can throw domain_error, invalid_argument, length_error, out_of_range
std::runtime_error - A Strategy implementation can also throw range_error, overflow_error, underflow_error.
CORBA::SystemException 

void OrbRunStrategy::interrupt bool  state  )  [inherited]
 

Set the interrupted state of this instance

The interrupted state indicates if the ORB run has been asked to shutdown

Parameters:
state - true to interrupt this instance.

bool OrbRunStrategy::interrupted  )  [inline, inherited]
 

Query the interrupted state of this instance

The interrupted state indicates if the ORB run has been asked to shutdown

Returns:
True if this instance has been interrupted

virtual void ThreadedOrbRunStrategy::orb_run  )  [virtual]
 

Covers ORB::run

Called from kickstart. Each thread calls orb_run


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