Class for creating, managing and serving requests to CORBA servants.
More...
#include <carma/corba/Server.h>
|
template<typename S , typename N > |
void | addNotificationServantFunctor (S &servant, const ::std::string &channelName, const ::std::string &proxyName) |
| Add servant to process IDL defined notifications on given channel. More...
|
|
template<template< typename > class T, typename S > |
void | addServant (S &servant, const ::std::string &nameserverName) |
| Add servant S, incarnate with IDL generated tie T and publish. More...
|
|
template<template< typename > class T, typename S > |
void | addServant (S &servant, typename T< S >::_stub_ptr_type &corbaClientPtr) |
| Add servant S, incarnate with generated tie T and set client pointer. More...
|
|
void | run (bool inSeparateThread=false) |
| Service remote requests continuously (blocks). More...
|
|
| Server (int argc, char *argv[], int rrtt=60) |
| Initialize CORBA server runtime. More...
|
|
void | stop () |
| Stop serving remote requests permanently. More...
|
|
bool | terminated () const |
| Check if server has terminated, including via the IMR. More...
|
|
void | work () |
| Service remote requests if pending (non blocking). More...
|
|
virtual | ~Server () |
| Destructor. More...
|
|
|
Client & | carma::util::ProgramBase::getCorbaClient () |
|
Class for creating, managing and serving requests to CORBA servants.
This class encapsulates all CORBA server functionality in CARMA. For examples ranging from trivial to complex, see the Test directory.
Author: Andrew Beard
Definition at line 22 of file Server.h.
carma::corba::Server::Server |
( |
int |
argc, |
|
|
char * |
argv[], |
|
|
int |
rrtt = 60 |
|
) |
| |
|
explicit |
Initialize CORBA server runtime.
- Parameters
-
argc | Command line arguments to initialize ORB from. |
argv | Command line arguments to initialized ORB from. |
rrtt | Relative round-trip timeout for commands. |
- See Also
- carma::util::Program::getCorbaServer()
virtual carma::corba::Server::~Server |
( |
| ) |
|
|
virtual |
template<typename S , typename N >
void carma::corba::Server::addNotificationServantFunctor |
( |
S & |
servant, |
|
|
const ::std::string & |
channelName, |
|
|
const ::std::string & |
proxyName |
|
) |
| |
Add servant to process IDL defined notifications on given channel.
Servant must define functor void S::operator()( N & notification ). Notifications are IDL defined structures. Multiple consumers on the same channel must have distinct proxy names.
- Parameters
-
servant | Servant functor to process notifications of type N. |
channeName | Name of notification channel. |
proxyName | Notification channel proxy name. |
template<template< typename > class T, typename S >
void carma::corba::Server::addServant |
( |
S & |
servant, |
|
|
const ::std::string & |
nameserverName |
|
) |
| |
Add servant S, incarnate with IDL generated tie T and publish.
- Parameters
-
servant | Instance defining how to process requests. |
nameserverName | Published name in "context.object" form. |
template<template< typename > class T, typename S >
void carma::corba::Server::addServant |
( |
S & |
servant, |
|
|
typename T< S >::_stub_ptr_type & |
corbaClientPtr |
|
) |
| |
Add servant S, incarnate with generated tie T and set client pointer.
- Parameters
-
servant | Instance defining how to process requests. |
corbaClientPtr | Client pointer to incarnated CORBA servant. |
void carma::corba::Server::run |
( |
bool |
inSeparateThread = false | ) |
|
Service remote requests continuously (blocks).
- Parameters
-
inSeparateThread | Run in newly spawned separate thread. |
void carma::corba::Server::stop |
( |
| ) |
|
Stop serving remote requests permanently.
bool carma::corba::Server::terminated |
( |
| ) |
const |
Check if server has terminated, including via the IMR.
- Postcondition
- Servant instances no longer used and can be safely destructed.
void carma::corba::Server::work |
( |
| ) |
|
Service remote requests if pending (non blocking).
The documentation for this class was generated from the following file: