Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
doil::Ice::IceManager Class Reference

#include <IceManager.h>

Inheritance diagram for doil::Ice::IceManager:
Inheritance graph
[legend]

Classes

class  Entry
 
class  EntryPred
 
class  FactoryPred
 
class  find_by_obj
 

Public Member Functions

virtual ReturnCode_t activateObject (doil::ImplBase *impl) throw ()
 Activate object. More...
 
virtual ReturnCode_t activateObject (doil::ImplBase *impl, doil::ServantBase *servant) throw ()
 Activate object. More...
 
virtual ReturnCode_t deactivateObject (doil::ImplBase *impl) throw ()
 Deactivate object. More...
 
virtual ReturnCode_t deactivateObject (const char *name) throw ()
 Deactivate object. More...
 
::Ice::ObjectAdapterPtr getAdapter () throw ()
 Getting default POA pointer. More...
 
virtual ImplBasegetImpl (const char *name) throw ()
 Getting object by name. More...
 
::Ice::CommunicatorPtr getORB () throw ()
 Getting ORB pointer. More...
 
::Ice::ObjectPrx getReference (const char *name) throw ()
 Getting object reference from the given name. More...
 
virtual ServantBasegetServant (const char *name) throw ()
 Getting servant object by name. More...
 
virtual const char * name () throw ()
 Getting ORB's name. More...
 
virtual ReturnCode_t registerFactory (const char *id, doil::ServantNewFunc new_func, doil::ServantDeleteFunc delete_func) throw ()
 Register servant's factory. More...
 
virtual void run () throw ()
 
virtual void shutdown () throw ()
 Shutdown ORB. More...
 
virtual ImplBasetoImpl (doil::ServantBase *servant) throw ()
 Getting impl object by servant. More...
 
doil::ImplBasetoImpl (::Ice::ObjectPrx obj) throw ()
 Convert Ice ObjectPrx to Impl related to it. More...
 
::Ice::ObjectPrx toReference (doil::ImplBase *impl) throw ()
 Converting Impl object to object reference. More...
 
::Ice::ObjectPrx toReference (doil::ServantBase *servant) throw ()
 Converting Servant object to object reference. More...
 
virtual ServantBasetoServant (doil::ImplBase *lobj) throw ()
 Getting servant object by impl object. More...
 
doil::ServantBasetoServant (::Ice::ObjectPrx obj) throw ()
 Getting ORB pointer. More...
 
- Public Member Functions inherited from doil::IORB
virtual ~IORB () throw ()
 Register an ORB to the ORBManager. More...
 

Static Public Member Functions

static IceManagerinit (coil::Properties prop) throw ()
 initializer More...
 
static IceManagerinstance () throw ()
 getting instance More...
 

Protected Member Functions

std::string createIceOptions ()
 Create ORB command options. More...
 
void initIce (coil::Properties prop)
 Ice ORB initialization. More...
 

Private Types

typedef ObjectManager< const char *, Entry, EntryPredObjectMap
 

Private Member Functions

 IceManager ()
 
 IceManager (const IceManager &cmgr)
 
IceManageroperator= (const IceManager &rhs)
 
 ~IceManager () throw ()
 

Private Attributes

::Ice::ObjectAdapterPtr m_adapter
 
coil::Properties m_config
 
ObjectManager< const char *, ServantFactory, FactoryPredm_factory
 
::Ice::CommunicatorPtr m_ice
 
ObjectMap m_map
 

Static Private Attributes

static IceManagermanager = NULL
 
static coil::Mutex mutex
 

Detailed Description

This class is a singleton class that interfaces IORB.

Definition at line 47 of file IceManager.h.

Member Typedef Documentation

Definition at line 565 of file IceManager.h.

Constructor & Destructor Documentation

doil::Ice::IceManager::IceManager ( )
inlineprivate

Definition at line 504 of file IceManager.h.

doil::Ice::IceManager::IceManager ( const IceManager cmgr)
private
doil::Ice::IceManager::~IceManager ( )
throw (
)
inlineprivate

Definition at line 508 of file IceManager.h.

Member Function Documentation

ReturnCode_t doil::Ice::IceManager::activateObject ( doil::ImplBase impl)
throw (
)
virtual

Activate object.

This operation will activate given object The servant that has same ID with the given object's ID should exist in this ORB servant's map. INVALID_ARGS error code will return if the factory does not exist.

Returns
OK: Normal return ALREADY_EXISTS: Given object already exists. INVALID_ARGS: The given arguments is invalid. UNKNOWN: Unknown error

Implements doil::IORB.

Definition at line 138 of file IceManager.cpp.

ReturnCode_t doil::Ice::IceManager::activateObject ( doil::ImplBase impl,
doil::ServantBase servant 
)
throw (
)
virtual

Activate object.

This operation will activate given object The servant's factory that activate the given object does not need to exists in this ORB manager. However, the given servant's ID and the given object's ID have to be same. INVALID_ARGS error will be returned if these IDs are not same.

Returns
OK: Normal return ALREADY_EXISTS: Given object already exists. INVALID_ARGS: The given arguments is invalid. UNKNOWN: Unknown error

Implements doil::IORB.

Definition at line 183 of file IceManager.cpp.

std::string doil::Ice::IceManager::createIceOptions ( )
protected

Create ORB command options.

Create ORB launch options from configuration information that has been set.

Returns
ORB launch options

Definition at line 452 of file IceManager.cpp.

ReturnCode_t doil::Ice::IceManager::deactivateObject ( doil::ImplBase impl)
throw (
)
virtual

Deactivate object.

This operation will deactivate the given object. NOT_FOUND error will be returned if the given object does not exist in the ative object map.

Returns
OK: Normal return NOT_FOUND: Given object does not exist in the map. INVALID_ARGS: The given arguments is invalid. UNKNOWN: Unknown error

Implements doil::IORB.

Definition at line 216 of file IceManager.cpp.

ReturnCode_t doil::Ice::IceManager::deactivateObject ( const char *  name)
throw (
)
virtual

Deactivate object.

This operation will deactivate the given name's object. NOT_FOUND error will be returned if the given object does not exist in the ative object map.

Returns
OK: Normal return NOT_FOUND: Given object does not exist in the map. INVALID_ARGS: The given arguments is invalid. UNKNOWN: Unknown error

Implements doil::IORB.

Definition at line 230 of file IceManager.cpp.

Ice::ObjectAdapterPtr doil::Ice::IceManager::getAdapter ( )
throw (
)

Getting default POA pointer.

Definition at line 417 of file IceManager.cpp.

doil::ImplBase * doil::Ice::IceManager::getImpl ( const char *  name)
throw (
)
virtual

Getting object by name.

This operation will return a object by given name. NOT_FOUND error will be returned if the given name's object does not exist in the ative object map.

Returns
OK: Normal return NOT_FOUND: The object does not exist in the map. INVALID_ARGS: The given arguments is invalid. UNKNOWN: Unknown error

Implements doil::IORB.

Definition at line 258 of file IceManager.cpp.

Ice::CommunicatorPtr doil::Ice::IceManager::getORB ( )
throw (
)

Getting ORB pointer.

Definition at line 404 of file IceManager.cpp.

Ice::ObjectPrx doil::Ice::IceManager::getReference ( const char *  name)
throw (
)

Getting object reference from the given name.

Definition at line 345 of file IceManager.cpp.

doil::ServantBase * doil::Ice::IceManager::getServant ( const char *  name)
throw (
)
virtual

Getting servant object by name.

This operation will return an servant object by given name. NOT_FOUND error will be returned if the given name's servant object does not exist in the ative object map.

Returns
OK: Normal return NOT_FOUND: The object does not exist in the map. INVALID_ARGS: The given arguments is invalid. UNKNOWN: Unknown error

Implements doil::IORB.

Definition at line 294 of file IceManager.cpp.

IceManager * doil::Ice::IceManager::init ( coil::Properties  prop)
throw (
)
static

initializer

Definition at line 42 of file IceManager.cpp.

void doil::Ice::IceManager::initIce ( coil::Properties  prop)
protected

Ice ORB initialization.

Initialize ORB based on the configuration given by arguments.

Returns
ORB initialization result (Successful:true, Failed:false)

Definition at line 427 of file IceManager.cpp.

IceManager & doil::Ice::IceManager::instance ( )
throw (
)
static

getting instance

Definition at line 64 of file IceManager.cpp.

const char * doil::Ice::IceManager::name ( )
throw (
)
virtual

Getting ORB's name.

This operation will return ORB's name.

Implements doil::IORB.

Definition at line 78 of file IceManager.cpp.

IceManager& doil::Ice::IceManager::operator= ( const IceManager rhs)
private
ReturnCode_t doil::Ice::IceManager::registerFactory ( const char *  id,
doil::ServantNewFunc  new_func,
doil::ServantDeleteFunc  delete_func 
)
throw (
)
virtual

Register servant's factory.

This operation will register servant's factory.

Returns
OK: Normal return ALREADY_EXISTS: Given factory already exists. INVALID_ARGS: One or more given arguments are invalid. UNKNOWN: Unknown error

Implements doil::IORB.

Definition at line 115 of file IceManager.cpp.

void doil::Ice::IceManager::run ( )
throw (
)
virtual

Definition at line 83 of file IceManager.cpp.

void doil::Ice::IceManager::shutdown ( )
throw (
)
virtual

Shutdown ORB.

This operation will shutdown ORB

Implements doil::IORB.

Definition at line 91 of file IceManager.cpp.

doil::ImplBase * doil::Ice::IceManager::toImpl ( doil::ServantBase servant)
throw (
)
virtual

Getting impl object by servant.

This operation will return an impl object by given servant. NOT_FOUND error will be returned if the given servant's impl object does not exist in the ative object map.

Returns
OK: Normal return NOT_FOUND: The object does not exist in the map. INVALID_ARGS: The given arguments is invalid. UNKNOWN: Unknown error

Implements doil::IORB.

Definition at line 275 of file IceManager.cpp.

doil::ImplBase * doil::Ice::IceManager::toImpl ( ::Ice::ObjectPrx  obj)
throw (
)

Convert Ice ObjectPrx to Impl related to it.

Definition at line 329 of file IceManager.cpp.

Ice::ObjectPrx doil::Ice::IceManager::toReference ( doil::ImplBase impl)
throw (
)

Converting Impl object to object reference.

Definition at line 360 of file IceManager.cpp.

Ice::ObjectPrx doil::Ice::IceManager::toReference ( doil::ServantBase servant)
throw (
)

Converting Servant object to object reference.

Definition at line 373 of file IceManager.cpp.

doil::ServantBase * doil::Ice::IceManager::toServant ( doil::ImplBase lobj)
throw (
)
virtual

Getting servant object by impl object.

This operation will return an servant object by given impl object. NOT_FOUND error will be returned if the given name's servant object does not exist in the ative object map.

Returns
OK: Normal return NOT_FOUND: The object does not exist in the map. INVALID_ARGS: The given arguments is invalid. UNKNOWN: Unknown error

Implements doil::IORB.

Definition at line 312 of file IceManager.cpp.

doil::ServantBase * doil::Ice::IceManager::toServant ( ::Ice::ObjectPrx  obj)
throw (
)

Getting ORB pointer.

Definition at line 388 of file IceManager.cpp.

Member Data Documentation

::Ice::ObjectAdapterPtr doil::Ice::IceManager::m_adapter
private

Definition at line 522 of file IceManager.h.

coil::Properties doil::Ice::IceManager::m_config
private

Definition at line 525 of file IceManager.h.

ObjectManager<const char*, ServantFactory, FactoryPred> doil::Ice::IceManager::m_factory
private

Definition at line 582 of file IceManager.h.

::Ice::CommunicatorPtr doil::Ice::IceManager::m_ice
private

Definition at line 519 of file IceManager.h.

ObjectMap doil::Ice::IceManager::m_map
private

Definition at line 566 of file IceManager.h.

IceManager * doil::Ice::IceManager::manager = NULL
staticprivate

Definition at line 515 of file IceManager.h.

coil::Mutex doil::Ice::IceManager::mutex
staticprivate

Definition at line 516 of file IceManager.h.


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


openrtm_aist
Author(s): Noriaki Ando
autogenerated on Mon Jun 10 2019 14:08:00