Static Public Member Functions | Static Private Attributes

maci::MACIHelper Class Reference

#include <maciHelper.h>

List of all members.

Static Public Member Functions

static ACE_CString extractHostnameFromCorbaloc (const ACE_TCHAR *corbaloc)
static ACE_CString getManagerHostname (int argc, ACE_TCHAR **argv)
static maci::Manager_ptr resolveManager (CORBA::ORB_ptr orb, int argc, ACE_TCHAR **argv, int retries=3, unsigned int secTimeout=0)
static maci::Manager_ptr resolveManager (CORBA::ORB_ptr orb, const ACE_TCHAR *reference, int retries=3, unsigned int secTimeout=0)
static CosNaming::NamingContext_ptr resolveNameService (CORBA::ORB_ptr orb, int retries=3, unsigned int secTimeout=0)
static CosNaming::NamingContext_ptr resolveNameService (CORBA::ORB_ptr orb, const ACE_TCHAR *reference, int retries=3, unsigned int secTimeout=0)
static CORBA::Repository_ptr resolveInterfaceRepository (CORBA::ORB_ptr orb, maci::Manager_ptr manager, int argc, ACE_TCHAR **argv, int retries=3, unsigned int secTimeout=0)
static CORBA::Repository_ptr resolveInterfaceRepository (CORBA::ORB_ptr orb, const ACE_TCHAR *reference, int retries=3, unsigned int secTimeout=0)
static void terminateResolving (bool terminate=true)

Static Private Attributes

static bool m_terminate

Detailed Description

MACIHelper class is a class helping to handle commonly used operations.

Author:
Matej Sekoranja, Jozef Stefan Institute, Slovenia
Version:
"@(#) $Id: maciHelper.h,v 1.89 2008/07/25 07:32:36 cparedes Exp $"

Member Function Documentation

static ACE_CString maci::MACIHelper::extractHostnameFromCorbaloc ( const ACE_TCHAR *  corbaloc  )  [static]

Extract hostname from corbaloc address.

Parameters:
corbaloc corbaloc address
Returns:
hostname or empty string on failure
static ACE_CString maci::MACIHelper::getManagerHostname ( int  argc,
ACE_TCHAR **  argv 
) [static]

getManagerHostname is a method helping to retrieve Manager's hostname. The Manager hostame is extraced using the first valid of the following options: # Command line option -m or -managerReference # ManagerReference value in configuration database # Environment variable MANAGER_REFERENCE # hostname

Parameters:
argv command line parameter count
argc command line array of strings
Returns:
Manager's hostname
static CORBA::Repository_ptr maci::MACIHelper::resolveInterfaceRepository ( CORBA::ORB_ptr  orb,
const ACE_TCHAR *  reference,
int  retries = 3,
unsigned int  secTimeout = 0 
) [static]

resolveInterfaceRepository method resolve given stringified CORBA reference to the InterfaceRepository.

Parameters:
orb CORBA ORB
reference stringified CORBA reference to the InterfaceRepository
retries number of retries resolving InterfaceRepository reference, <= 0 means infinite
secTimeout timeout expressed in seconds, == 0 means inifinite (dt between retries is 3secs)
Returns:
CORBA reference to the InterfaceRepository or CORBA::Object::_nil()
static CORBA::Repository_ptr maci::MACIHelper::resolveInterfaceRepository ( CORBA::ORB_ptr  orb,
maci::Manager_ptr  manager,
int  argc,
ACE_TCHAR **  argv,
int  retries = 3,
unsigned int  secTimeout = 0 
) [static]

resolveInterfaceRepository method is a method helping to resolve CORBA InterfaceRepository's reference. The InterfaceRepository reference is defined by the first valid of the following options: # Command line option -ORBInitRef InterfaceRepository=<corbaloc reference>=""> (e.g. corbaloc::te1.hq.eso.org:xxxx) using CORBA::ORB::resolve_initial_references("InterfaceRepository"), ORB has to be already initialized with the command line # Manager get_service("InterfaceRepository") # corbaloc::<manager's hostname>:xxxx/NameService # corbaloc::<hostname>:xxxx/NameService

Parameters:
orb CORBA ORB
manager Manager's reference.
argv command line parameter count
argc command line array of strings
retries number of retries resolving NameService reference, <= 0 means infinite
secTimeout timeout expressed in seconds, == 0 means inifinite (dt between retries is 3secs).
Returns:
CORBA reference to the InterfaceRepository or CORBA::Object::_nil()
static maci::Manager_ptr maci::MACIHelper::resolveManager ( CORBA::ORB_ptr  orb,
const ACE_TCHAR *  reference,
int  retries = 3,
unsigned int  secTimeout = 0 
) [static]

resolveManager method resolve given stringified CORBA reference to the Maneger.

Parameters:
orb CORBA ORB
reference stringified CORBA reference to the Manager
retries number of retries resolving Manager reference, <= 0 means infinite
secTimeout timeout expressed in seconds, == 0 means inifinite (dt between retries is 3secs)
Returns:
CORBA reference to the Manager or maci::Manager::_nil() if unable to resolve Manager reference
static maci::Manager_ptr maci::MACIHelper::resolveManager ( CORBA::ORB_ptr  orb,
int  argc,
ACE_TCHAR **  argv,
int  retries = 3,
unsigned int  secTimeout = 0 
) [static]

resolveManager method is a method helping to resolve Manager's reference. The Manager reference is defined by the first valid of the following options: # Command line option -m or -managerReference # ManagerReference value in configuration database # Environment variable MANAGER_REFERENCE # corbaloc::<hostname>:xxxx/Manager

Parameters:
orb CORBA ORB
argv command line parameter count
argc command line array of strings
retries number of retries resolving Manager's reference, <= 0 means infinite
secTimeout timeout expressed in seconds, == 0 means inifinite (dt between retries is 3 secs)
Returns:
CORBA reference to the Manager or maci::Manager::_nil() if unable to resolve Manager's reference
static CosNaming::NamingContext_ptr maci::MACIHelper::resolveNameService ( CORBA::ORB_ptr  orb,
const ACE_TCHAR *  reference,
int  retries = 3,
unsigned int  secTimeout = 0 
) [static]

resolveNameService method resolve given stringified CORBA reference to the NameService.

Parameters:
orb CORBA ORB
reference stringified CORBA reference to the NameService
retries number of retries resolving NameService reference, <= 0 means infinite
secTimeout timeout expressed in seconds, == 0 means inifinite (dt between retries is 3secs)
Returns:
CORBA reference to the NameService's root CosNaming::NamingContext or CosNaming::NamingContext::_nil() if unable to resolve NameService reference
static CosNaming::NamingContext_ptr maci::MACIHelper::resolveNameService ( CORBA::ORB_ptr  orb,
int  retries = 3,
unsigned int  secTimeout = 0 
) [static]

resolveNameService method is a method helping to resolve CORBA NameService's reference. The NameService reference is defined by the first valid of the following options: # Command line option -ORBInitRef NameService=<corbaloc reference>=""> (e.g. corbaloc::te1.hq.eso.org:xxxx) using CORBA::ORB::resolve_initial_references("NameService"), ORB has to be already initialized with the command line # Environment variable NAMESERVICE_REFERENCE # corbaloc::<hostname>:xxxx/NameService

Parameters:
orb CORBA ORB
retries number of retries resolving NameService reference, <= 0 means infinite
secTimeout timeout expressed in seconds, == 0 means inifinite (dt between retries is 3secs)
Returns:
CORBA reference to the NameService's root CosNaming::NamingContext
static void maci::MACIHelper::terminateResolving ( bool  terminate = true  )  [static]

Terminates all resolving processes

Parameters:
terminate true is all resolving processes are to be cancelled (default), false to set termiante flag to false

Member Data Documentation

bool maci::MACIHelper::m_terminate [static, private]

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