hpp-template-corba  4.9.0
Template corba server
hpp::corba::ServerBase Class Reference

#include <hpp/corba/template/server.hh>

Inheritance diagram for hpp::corba::ServerBase:

Public Member Functions

 ServerBase (int argc, const char *argv[], const char *orb_identifier="", const char *options[][2]=0)
 Constructor. More...
 
virtual ~ServerBase ()
 Shutdown CORBA server. More...
 
int startCorbaServer (const std::string &contextId, const std::string &contextKind, const std::string &objectId, const std::string &objectKind)
 Initialize CORBA server to process requests from clients and declare it to the NameService (DNS for CORBA) More...
 
int startCorbaServer (const std::string &contextId, const std::string &contextKind)
 Initialize CORBA server to process requests from clients and declare it to the NameService (DNS for CORBA) More...
 
int startCorbaServer ()
 Initialize CORBA server to process requests from clients. More...
 
int processRequest (bool loop)
 If ORB work is pending, process it. More...
 
PortableServer::POA_var main_poa ()
 
PortableServer::POA_var poa ()
 The Portable Object Adapter used to active the server. More...
 
CORBA::ORB_var orb ()
 
CORBA server initialization
bool initORB (int argc, const char *argv[], const char *orb_identifier, const char *options[][2])
 
bool initRootPOA (bool inMultiThread)
 
bool initOmniINSPOA ()
 

Protected Member Functions

void setServant (CORBA::Object_ptr obj)
 

Protected Attributes

CORBA::ORB_var orb_
 
PortableServer::POA_var poa_
 
PortableServer::POA_var main_poa_
 
PortableServer::POA_var ins_poa_
 
CosNaming::NamingContext_var hppContext_
 Corba context. More...
 

Constructor & Destructor Documentation

◆ ServerBase()

hpp::corba::ServerBase::ServerBase ( int  argc,
const char *  argv[],
const char *  orb_identifier = "",
const char *  options[][2] = 0 
)

Constructor.

Parameters
argc,argvparameter to feed ORB initialization.
Note
It is recommended to configure your Corba implementation through environment variables and to set argc to 1 and argv to any string.

◆ ~ServerBase()

virtual hpp::corba::ServerBase::~ServerBase ( )
virtual

Shutdown CORBA server.

Member Function Documentation

◆ initOmniINSPOA()

bool hpp::corba::ServerBase::initOmniINSPOA ( )

◆ initORB()

bool hpp::corba::ServerBase::initORB ( int  argc,
const char *  argv[],
const char *  orb_identifier,
const char *  options[][2] 
)

Initialize ORB. This is called by the constructor of this class and should not be called manually.

◆ initRootPOA()

bool hpp::corba::ServerBase::initRootPOA ( bool  inMultiThread)

◆ main_poa()

PortableServer::POA_var hpp::corba::ServerBase::main_poa ( )
inline

◆ orb()

CORBA::ORB_var hpp::corba::ServerBase::orb ( )
inline

◆ poa()

PortableServer::POA_var hpp::corba::ServerBase::poa ( )
inline

The Portable Object Adapter used to active the server.

◆ processRequest()

int hpp::corba::ServerBase::processRequest ( bool  loop)

If ORB work is pending, process it.

Parameters
loopif true, the function never returns; if false, the function processes pending requests and returns.

◆ setServant()

void hpp::corba::ServerBase::setServant ( CORBA::Object_ptr  obj)
protected

◆ startCorbaServer() [1/3]

int hpp::corba::ServerBase::startCorbaServer ( const std::string &  contextId,
const std::string &  contextKind,
const std::string &  objectId,
const std::string &  objectKind 
)

Initialize CORBA server to process requests from clients and declare it to the NameService (DNS for CORBA)

Parameters
contextIdfirst part of context name
contextKindsecond part of context name
objectIdfirst part of CORBA server name
objectKindsecond part of CORBA server name
Returns
0 if success, -1 if failure.

The CORBA server is referenced in the name server by context and name: contextId.contextKind/objectId.objectKind. The context can be seen as a directory and the object as a filename.

◆ startCorbaServer() [2/3]

int hpp::corba::ServerBase::startCorbaServer ( const std::string &  contextId,
const std::string &  contextKind 
)

Initialize CORBA server to process requests from clients and declare it to the NameService (DNS for CORBA)

Parameters
contextIdfirst part of context name
contextKindsecond part of context name
Returns
0 if success, -1 if failure.

The CORBA server is referenced in the name server by context and name: contextId.contextKind.

◆ startCorbaServer() [3/3]

int hpp::corba::ServerBase::startCorbaServer ( )

Initialize CORBA server to process requests from clients.

Member Data Documentation

◆ hppContext_

CosNaming::NamingContext_var hpp::corba::ServerBase::hppContext_
protected

Corba context.

◆ ins_poa_

PortableServer::POA_var hpp::corba::ServerBase::ins_poa_
protected

◆ main_poa_

PortableServer::POA_var hpp::corba::ServerBase::main_poa_
protected

◆ orb_

CORBA::ORB_var hpp::corba::ServerBase::orb_
protected

◆ poa_

PortableServer::POA_var hpp::corba::ServerBase::poa_
protected

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