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

OrbRunStrategy Class Reference

#include <OrbRunStrategy.h>

Inheritance diagram for OrbRunStrategy:

BasicOrbRunStrategy ThreadedOrbRunStrategy List of all members.

Detailed Description

Customize the way that your application calls ORB::run.

Applications sometimes need to do different things around the ORB message loop. Some need to integrate another message loop with the ORB's message loop. Others (like TAO) need to have the application's thread model defined.

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

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

Protected Member Functions

virtual void _apply (SysHook *sys_hook, ConfMap &config)=0 throw (std::logic_error, std::runtime_error, CORBA::SystemException )


Constructor & Destructor Documentation

OrbRunStrategy::OrbRunStrategy  ) 
 

ctor

virtual OrbRunStrategy::~OrbRunStrategy  )  [virtual]
 

dtor


Member Function Documentation

virtual void OrbRunStrategy::_apply SysHook sys_hook,
ConfMap config
throw (std::logic_error, std::runtime_error, CORBA::SystemException ) [protected, pure 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 

Implemented in BasicOrbRunStrategy, and ThreadedOrbRunStrategy.

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

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  ) 
 

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]
 

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


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