LogService
libdadi: utility tools for distributed applications
Static Public Member Functions | Static Public Attributes | List of all members
ORBTools Class Reference

Static Public Member Functions

static bool init (int argc, char **argv)
 
static bool init (int argc, char **argv, unsigned int tracelevel, unsigned int port=0)
 
static bool init ()
 
static bool registerServant (const char *contextName, const char *contextKind, const char *name, const char *kind, CORBA::Object *objref)
 
static bool registerServant (const char *name, const char *kind, CORBA::Object *objref)
 
static bool activateServant (PortableServer::ServantBase *object)
 
static bool activatePOA ()
 
static bool unregisterServant (const char *contextName, const char *contextKind, const char *name, const char *kind)
 
static bool unregisterServant (const char *name, const char *kind)
 
static bool findServant (const char *contextName, const char *contextKind, const char *name, const char *kind, CORBA::Object *&objref)
 
static bool findServant (const char *name, const char *kind, CORBA::Object *&objref)
 
static bool listen (char stopLowercase, char stopUppercase)
 
static bool kill ()
 

Static Public Attributes

static CORBA::ORB_var orb
 
static PortableServer::POA_var poa
 

Member Function Documentation

static bool ORBTools::activatePOA ( )
static

Activate the POA (Portable Object Adaptor). After this, all servants registered are accessible

Returns
true if the operation succeed
static bool ORBTools::activateServant ( PortableServer::ServantBase *  object)
static

Activate a servant. After this, the IOR of the servant is known by the POA.

Parameters
objectThe implementation of a servant
Returns
true if the operation succeed
static bool ORBTools::findServant ( const char *  contextName,
const char *  contextKind,
const char *  name,
const char *  kind,
CORBA::Object *&  objref 
)
static

Find a servant by asking the Namming Service with a specific context and name.

Parameters
contextNameName of the context
contextKindKind of the context (extra information)
nameName of the servant
kindKind of the servant (extra information)
objrefThe new servant found (check the return value to be sure that the reference is correct)
Returns
true if the operation succeed
static bool ORBTools::findServant ( const char *  name,
const char *  kind,
CORBA::Object *&  objref 
)
static

Find a servant by asking the Namming Service with the default context and name.

Parameters
nameName of the servant
kindKind of the servant (extra information)
objrefThe new servant found (check the return value to be sure that the reference is correct)
Returns
true if the operation succeed
static bool ORBTools::init ( int  argc,
char **  argv 
)
static

Initialize the CORBA ORB. See CORBA documentation for all possibles parameters.

Parameters
argcNumber of parameters to pass to the ORB
argvArray of parameters to pass to the ORB
Returns
true if the operation succeed
static bool ORBTools::init ( int  argc,
char **  argv,
unsigned int  tracelevel,
unsigned int  port = 0 
)
static

Initialize the CORBA ORB.

Parameters
argcNumber of parameters to pass to the ORB
argvArray of parameters to pass to the ORB
tracelevelThe tracelevel of the ORB (from 0 to 50)
portthe port to use for listenning servants (0 = default random)
Returns
true if the operation succeed
static bool ORBTools::init ( )
static

Initialize the CORBA ORB. None argument is set, usefull for tests

Returns
true if the operation succeed
static bool ORBTools::kill ( )
static

Shutdown and destroy the ORB

Returns
true if the operation succeed
static bool ORBTools::listen ( char  stopLowercase,
char  stopUppercase 
)
static

Make the thread to listen for a incomming connection to a servant. This function will return if the user enters a specific key.

Parameters
stopLowercasecharacter to hit for stopping the listen function
stopUppercasecharacter to hit for stopping the listen function
Returns
true if the operation succeed
static bool ORBTools::registerServant ( const char *  contextName,
const char *  contextKind,
const char *  name,
const char *  kind,
CORBA::Object *  objref 
)
static

Register a servant to the Namming Service within a specific context and name. Do not activate the servant.

Parameters
contextNameName of the new context
contextKindKind of the new context (extra information)
nameName of the servant
kindKind of the servant (extra information)
objrefThe implementation of a servant (result of the _this() function)
Returns
true if the operation succeed
static bool ORBTools::registerServant ( const char *  name,
const char *  kind,
CORBA::Object *  objref 
)
static

Register a servant to the Namming Service within the default context and with a specific name. Do not activate the servant.

Parameters
nameName of the servant
kindKind of the servant (extra information)
objrefThe implementation of a servant (result of the _this() function)
Returns
true if the operation succeed
static bool ORBTools::unregisterServant ( const char *  contextName,
const char *  contextKind,
const char *  name,
const char *  kind 
)
static

Unregister a servant to the Namming Service within a specific context and name.

Parameters
contextNameName of the context
contextKindKind of the context (extra information)
nameName of the servant
kindKind of the servant (extra information)
Returns
true if the operation succeed
static bool ORBTools::unregisterServant ( const char *  name,
const char *  kind 
)
static

Unregister a servant to the Namming Service within the default context and with a specific name.

Parameters
nameName of the servant
kindKind of the servant (extra information)
Returns
true if the operation succeed

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