BoilerPlate: Reusable CORBA |
#include <CorbaServer.h>
Inheritance diagram for OrbInit:
ORB initialization and control during application start-up is encapsulated and generalized in this class for reuse.
Public Types | |
enum | InitState { PRE_ORB_INIT, POST_ORB_INIT, POST_POA_INIT, RUNNING, SHUTTING_DOWN } |
Public Member Functions | |
OrbInit (int argc, char **argv) | |
virtual | ~OrbInit () |
void | addServantFactory (ServantFactory *factory) throw (BoilerPlate::IllegalStateException) |
void | addPreORBInitCommand (PreInitCommand *command) throw (BoilerPlate::IllegalStateException) |
void | addPostORBInitCommand (PostORBInitCommand *command) throw (BoilerPlate::IllegalStateException) |
void | addPostPOAInitCommand (PostInitCommand *command) throw (BoilerPlate::IllegalStateException) |
void | addPreShutdownCommand (PostInitCommand *command) throw (BoilerPlate::IllegalStateException) |
void | setOrbRunStrategy (OrbRunStrategy *strategy) throw (BoilerPlate::IllegalStateException) |
void | initialize (int argc, char **argv) throw (InitializationError) |
void | buildServants () throw (InitializationError, BoilerPlate::IllegalStateException, ServantFactory::ServantBuildException ) |
void | acceptMessages () throw (CORBA::SystemException, std::runtime_error) |
virtual void | shutDown () throw (CORBA::SystemException) |
virtual void | run () throw (CORBA::SystemException) |
virtual void | holdRequests (bool wait) throw (PortableServer::POAManager::AdapterInactive) |
virtual void | activate () throw (PortableServer::POAManager::AdapterInactive) |
virtual void | discardRequests (bool wait) throw (PortableServer::POAManager::AdapterInactive) |
SignalController & | getSignalController () |
|
The states of OrbInit.
|
|
The only ctor |
|
virtual dtor Deletes all ServantFactories and Commands |
|
Called when the system is ready to process client messages The operation assumes the initialize and buildServants have been called and completed successfully. If the preconditions are true then orb->run is called to begin accepting client requests. This operation does not return until the ORB is told to stop processing client requests.
|
|
Activate the POAManager Implements SysHook. |
|
Add a command to be called immediately after the ORB is initialized PostORBInitCommands are called after the ORB is initialized and before the RootPOA is initialized. These objects will be deleted during shutdown
|
|
Add a command to be called after the RootPOA is initialized These PostInitCommands are called after the RootPOA is initialized and before ServantFactories are initialized. These objects will be deleted during shutdown
|
|
Add a PreInitCommand to be fired before the ORB is initialized PreInitCommands are called before the ORB is initialized. You can use them to initialize other system components. Ownership is assumed by OrbInit. These objects will be deleted during shutdown.
|
|
Add a command to be called immediately after orb->run exits These PostInitCommands are called after orb->exits but before ServantFactories and before ServantFactories are initialized. These objects will be deleted during shutdown
|
|
Add a ServantFactory to be initialized Adds a ServantFactory to internal storage. ServantFactories are called in the order they are received. Ownership is taken by OrbInit. ServantFactories are deleted when OrbInit is shutting down.
|
|
Called to initialize the process Servants The operation is called after initialize is called. Users must implement the pure virtual ServantFactory contract and initialize those implementations in this operation.
|
|
Ask the system to discard requests The POA Manager will discard all incoming requests. The server will raise a TRANSIENT system exception.
Implements SysHook. |
|
Access the SignalController The SignalController is used to register SignalHandlers
|
|
Ask the system to hold requests A caller can ask the POAManager to hold requests until the caller uses activate
Implements SysHook. |
|
Called to begin the initialization method Call this operation to kick off the initialization of the system
|
|
Ask the system to run Implements SysHook. |
|
Set the strategy to use for ORB::run Some applications need more than the traditional ORB::run. Some ORB implementations require the application code to supply threading model (TAO for instance). The application main instances a derivation of OrbRunStrategy and registers it using this operation.
|
|
Purposefully shut this server down An administrative interface to shut the server down Implements SysHook. |
Copyright © BoilerPlate.org | Generated on Tue Nov 30 16:22:33 2004 for BoilerPlate by 1.3.7 |