OW_NAMESPACE::ServiceIFC Class Reference

#include <OW_ServiceIFC.hpp>

Inheritance diagram for OW_NAMESPACE::ServiceIFC:

Inheritance graph
[legend]
Collaboration diagram for OW_NAMESPACE::ServiceIFC:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual ~ServiceIFC ()
virtual String getName () const
 Every service may have a name.
virtual StringArray getDependencies () const
 Get the list of services this service depends on.
virtual StringArray getDependentServices () const
 Get the list of services that depend on this service which don't return this service's name from getDependencies().
virtual void init (const ServiceEnvironmentIFCRef &env)=0
 init() will be called to give the derived class an opportunity to initialize itself.
virtual void initialized ()
 initialized() will be called after init() has been sucessfully called on all services.
virtual void start ()
 In start(), a service should start doing whatever it does, such as starting a new thread or adding selectables to the environment.
virtual void started ()
 started() will be called on all services after start() has been called on all services.
virtual void shuttingDown ()
 shuttingdown() will be called before shutdown() is called on all services.
virtual void shutdown ()=0
 The service must shutdown completely before returning from this function.

Detailed Description

Definition at line 51 of file OW_ServiceIFC.hpp.


Constructor & Destructor Documentation

OW_NAMESPACE::ServiceIFC::~ServiceIFC  )  [virtual]
 

Definition at line 44 of file OW_ServiceIFC.cpp.


Member Function Documentation

StringArray OW_NAMESPACE::ServiceIFC::getDependencies  )  const [virtual]
 

Get the list of services this service depends on.

The returned services will be started before and shutdown after this service. It is an error to return the name of a non-existent service, and the cimom startup will fail. The default is to have no dependencies.

Reimplemented in OW_NAMESPACE::CIMServer, OW_NAMESPACE::PollingManager, OW_NAMESPACE::SharedLibraryRepository, OW_NAMESPACE::IndicationServerImpl, OW_NAMESPACE::XMLExecute, and OW_NAMESPACE::HTTPServer.

Definition at line 57 of file OW_ServiceIFC.cpp.

StringArray OW_NAMESPACE::ServiceIFC::getDependentServices  )  const [virtual]
 

Get the list of services that depend on this service which don't return this service's name from getDependencies().

It is an error to return a service's name if that service returns this service's name from getDependencies(). The returned services will be started after and shutdown before this service. It is an error to return the name of a non-existent service, and the cimom startup will fail. This mechanism allows a service to be initialized before another service, even if the other service didn't specify the name of this service as a dependency. The default is to have no dependent services.

Definition at line 64 of file OW_ServiceIFC.cpp.

String OW_NAMESPACE::ServiceIFC::getName  )  const [virtual]
 

Every service may have a name.

The name is used to calculate dependencies, other services can return the name from getDependencies(), to instruct the cimom about which order to start and shutdown all the services. The default is to have no name, in that case, no other service can depend on it.

Reimplemented in OW_NAMESPACE::SimpleAuthorizer, OW_NAMESPACE::AuthorizerManager, OW_NAMESPACE::CIMServer, OW_NAMESPACE::PollingManager, OW_NAMESPACE::ProviderManager, OW_NAMESPACE::SharedLibraryRepository, OW_NAMESPACE::WQLFilterRep, OW_NAMESPACE::IndicationRepLayerImpl, OW_NAMESPACE::IndicationServerImpl, OW_NAMESPACE::AuthManager, OW_NAMESPACE::XMLListener, OW_NAMESPACE::CIMRepository, OW_NAMESPACE::BinaryRequestHandler, OW_NAMESPACE::XMLExecute, OW_NAMESPACE::HTTPServer, and OW_NAMESPACE::WQLImpl.

Definition at line 50 of file OW_ServiceIFC.cpp.

virtual void OW_NAMESPACE::ServiceIFC::init const ServiceEnvironmentIFCRef env  )  [pure virtual]
 

init() will be called to give the derived class an opportunity to initialize itself.

Do not create threads which interact with the environment until start() is called. During the loading/initializing phase, the environment is single-threaded.

Parameters:
env The service's interface to it's environment. A copy of this may be saved and re-used. All copies of env or objects obtained by calling member functions of env should be set to 0 in shutdown() to prevent circular reference counts.

Implemented in OW_NAMESPACE::AuthorizerManager, OW_NAMESPACE::CIMServer, OW_NAMESPACE::PollingManager, OW_NAMESPACE::ProviderManager, OW_NAMESPACE::SharedLibraryRepository, OW_NAMESPACE::WQLFilterRep, OW_NAMESPACE::IndicationRepLayerImpl, OW_NAMESPACE::IndicationServerImpl, OW_NAMESPACE::AuthManager, OW_NAMESPACE::XMLListener, OW_NAMESPACE::AuthorizerIFC, OW_NAMESPACE::CIMRepository, OW_NAMESPACE::BinaryRequestHandler, OW_NAMESPACE::XMLExecute, OW_NAMESPACE::HTTPServer, and OW_NAMESPACE::WQLImpl.

void OW_NAMESPACE::ServiceIFC::initialized  )  [virtual]
 

initialized() will be called after init() has been sucessfully called on all services.

This gives a service the chance to communicate with another service if necessary. The default implementation does nothing.

Reimplemented in OW_NAMESPACE::SharedLibraryRepository.

Definition at line 71 of file OW_ServiceIFC.cpp.

virtual void OW_NAMESPACE::ServiceIFC::shutdown  )  [pure virtual]
 

The service must shutdown completely before returning from this function.

All copies of the service environment or objects obtained from it should be set to 0 to avoid circular reference counts.

Implemented in OW_NAMESPACE::AuthorizerManager, OW_NAMESPACE::CIMServer, OW_NAMESPACE::PollingManager, OW_NAMESPACE::ProviderManager, OW_NAMESPACE::SharedLibraryRepository, OW_NAMESPACE::WQLFilterRep, OW_NAMESPACE::IndicationRepLayerImpl, OW_NAMESPACE::IndicationServerImpl, OW_NAMESPACE::AuthManager, OW_NAMESPACE::XMLListener, OW_NAMESPACE::AuthorizerIFC, OW_NAMESPACE::CIMRepository, OW_NAMESPACE::BinaryRequestHandler, OW_NAMESPACE::XMLExecute, OW_NAMESPACE::HTTPServer, and OW_NAMESPACE::WQLImpl.

void OW_NAMESPACE::ServiceIFC::shuttingDown  )  [virtual]
 

shuttingdown() will be called before shutdown() is called on all services.

This gives a service the chance to communicate with any other services before they are shutdown. After shuttingDown() is called the services will begin to be shutdown. The default implementation does nothing.

Reimplemented in OW_NAMESPACE::ProviderManager, and OW_NAMESPACE::SharedLibraryRepository.

Definition at line 89 of file OW_ServiceIFC.cpp.

void OW_NAMESPACE::ServiceIFC::start  )  [virtual]
 

In start(), a service should start doing whatever it does, such as starting a new thread or adding selectables to the environment.

A service can't rely on the order of initalization, so if it needs to communicate with another one, that works hould be done in started() start() should not return until the service is actually started, but it must return.

Reimplemented in OW_NAMESPACE::PollingManager, OW_NAMESPACE::SharedLibraryRepository, OW_NAMESPACE::IndicationServerImpl, and OW_NAMESPACE::HTTPServer.

Definition at line 77 of file OW_ServiceIFC.cpp.

void OW_NAMESPACE::ServiceIFC::started  )  [virtual]
 

started() will be called on all services after start() has been called on all services.

The default implementation does nothing.

Reimplemented in OW_NAMESPACE::SharedLibraryRepository.

Definition at line 83 of file OW_ServiceIFC.cpp.


The documentation for this class was generated from the following files:
Generated on Thu Feb 9 09:15:17 2006 for openwbem by  doxygen 1.4.6