RTT::corba::TaskContextServer Class Reference
[Component IDL and Corba Setup]

#include <TaskContextServer.hpp>

Inheritance diagram for RTT::corba::TaskContextServer:
Inheritance graph
[legend]

List of all members.

Public Member Functions

CTaskContext_ptr server () const
CTaskContext_ptr server () const
 ~TaskContextServer ()
 ~TaskContextServer ()

Static Public Member Functions

static void CleanupServer (TaskContext *tc)
static void CleanupServer (TaskContext *tc)
static void CleanupServers ()
static void CleanupServers ()
static TaskContextServerCreate (TaskContext *tc, bool use_naming=true, bool require_name_service=false)
static TaskContextServerCreate (TaskContext *tc, bool use_naming=true, bool require_name_service=false)
static CTaskContext_ptr CreateServer (TaskContext *tc, bool use_naming=true, bool require_name_service=false)
static CTaskContext_ptr CreateServer (TaskContext *tc, bool use_naming=true, bool require_name_service=false)
static void DestroyOrb ()
static void DestroyOrb ()
static std::string getIOR (TaskContext *tc)
static std::string getIOR (TaskContext *tc)
static void RunOrb ()
static void RunOrb ()
static void ShutdownOrb (bool wait_for_completion=true)
static void ShutdownOrb (bool wait_for_completion=true)
static void ThreadOrb ()
static void ThreadOrb ()

Protected Types

typedef std::map< TaskContext
*, std::string > 
IorMap
typedef std::map< TaskContext
*, std::string > 
IorMap
typedef std::map< TaskContext
*, TaskContextServer * > 
ServerMap
typedef std::map< TaskContext
*, TaskContextServer * > 
ServerMap

Protected Member Functions

 TaskContextServer (TaskContext *taskcontext, bool use_naming, bool require_name_service)
 TaskContextServer (TaskContext *taskcontext, bool use_naming, bool require_name_service)

Static Protected Member Functions

static void DoShutdownOrb (bool wait_for_completion=true)
static void DoShutdownOrb (bool wait_for_completion=true)

Protected Attributes

PortableServer::POA_var mpoa
corba::CTaskContext_var mtask
PortableServer::ServantBase_var mtask_i
TaskContextmtaskcontext
bool muse_naming

Static Protected Attributes

static IorMap iors
static bool is_shutdown = false
static base::ActivityInterfaceorbrunner = 0
static ServerMap servers

Friends

class OrbRunner
class TaskContextProxy

Detailed Description

This class manages the creation of TaskContext Corba Servers and a Corba Object Request Broker (Orb) which executes the servers. The Orb may be run from the main thread or in its own thread.

Definition at line 65 of file install/include/rtt/transports/corba/TaskContextServer.hpp.


Member Typedef Documentation

typedef std::map<TaskContext*, std::string> RTT::corba::TaskContextServer::IorMap [protected]

Definition at line 79 of file rtt/transports/corba/TaskContextServer.hpp.

typedef std::map<TaskContext*, std::string> RTT::corba::TaskContextServer::IorMap [protected]

Definition at line 72 of file rtt/transports/corba/TaskContextServer.hpp.


Constructor & Destructor Documentation

RTT::corba::TaskContextServer::TaskContextServer ( TaskContext taskcontext,
bool  use_naming,
bool  require_name_service 
) [protected]

Private constructor which creates a new servant.

Definition at line 118 of file TaskContextServer.cpp.

RTT::corba::TaskContextServer::~TaskContextServer (  ) 

When a TaskContextServer is destroyed, the object reference is removed from the Naming Service and the servant is deleted.

Definition at line 77 of file TaskContextServer.cpp.

RTT::corba::TaskContextServer::TaskContextServer ( TaskContext taskcontext,
bool  use_naming,
bool  require_name_service 
) [protected]

Private constructor which creates a new servant.

RTT::corba::TaskContextServer::~TaskContextServer (  ) 

When a TaskContextServer is destroyed, the object reference is removed from the Naming Service and the servant is deleted.


Member Function Documentation

static void RTT::corba::TaskContextServer::CleanupServer ( TaskContext tc  )  [static]

Deletes a TaskContext server for a given taskcontext. If no such server exists, this method silently does nothing.

void RTT::corba::TaskContextServer::CleanupServer ( TaskContext tc  )  [static]

Deletes a TaskContext server for a given taskcontext. If no such server exists, this method silently does nothing.

Definition at line 255 of file TaskContextServer.cpp.

static void RTT::corba::TaskContextServer::CleanupServers (  )  [static]

Destroys all TaskContextServer objects.

void RTT::corba::TaskContextServer::CleanupServers (  )  [static]

Destroys all TaskContextServer objects.

Definition at line 242 of file TaskContextServer.cpp.

static TaskContextServer* RTT::corba::TaskContextServer::Create ( TaskContext tc,
bool  use_naming = true,
bool  require_name_service = false 
) [static]

Factory method: create a CORBA server for an existing TaskContext.

Parameters:
tc The TaskContext to serve.
use_naming Set to false in order not to use the Corba Naming Service.
require_naming Set to true to require that the Corba Naming Service be found.
Return values:
0 if the ORB is not initialised, or if require_name_service==true and the name service was not found
Returns:
A new or previously created CORBA server for tc.
TaskContextServer * RTT::corba::TaskContextServer::Create ( TaskContext tc,
bool  use_naming = true,
bool  require_name_service = false 
) [static]

Factory method: create a CORBA server for an existing TaskContext.

Parameters:
tc The TaskContext to serve.
use_naming Set to false in order not to use the Corba Naming Service.
require_naming Set to true to require that the Corba Naming Service be found.
Return values:
0 if the ORB is not initialised, or if require_name_service==true and the name service was not found
Returns:
A new or previously created CORBA server for tc.

Definition at line 392 of file TaskContextServer.cpp.

static CTaskContext_ptr RTT::corba::TaskContextServer::CreateServer ( TaskContext tc,
bool  use_naming = true,
bool  require_name_service = false 
) [static]

Factory method: create a CORBA server for an existing TaskContext. Same as above, but immediately return the Corba object. Also checks if tc is TaskContextProxy and returns the server of the proxy if so.

Parameters:
tc The TaskContext to serve.
use_naming Set to false in order not to use the Corba Naming Service.
require_naming Set to true to require that the Corba Naming Service be found.
Return values:
0 if the ORB is not initialised, or if require_name_service==true and the name service was not found
Returns:
A new or previously created CORBA server for tc. Since this is a factory function, you need to store the object in a _var and don't need to _duplicate it.
CTaskContext_ptr RTT::corba::TaskContextServer::CreateServer ( TaskContext tc,
bool  use_naming = true,
bool  require_name_service = false 
) [static]

Factory method: create a CORBA server for an existing TaskContext. Same as above, but immediately return the Corba object. Also checks if tc is TaskContextProxy and returns the server of the proxy if so.

Parameters:
tc The TaskContext to serve.
use_naming Set to false in order not to use the Corba Naming Service.
require_naming Set to true to require that the Corba Naming Service be found.
Return values:
0 if the ORB is not initialised, or if require_name_service==true and the name service was not found
Returns:
A new or previously created CORBA server for tc. Since this is a factory function, you need to store the object in a _var and don't need to _duplicate it.

Definition at line 413 of file TaskContextServer.cpp.

static void RTT::corba::TaskContextServer::DestroyOrb (  )  [static]

Invoke this method once to cleanup the orb.

void RTT::corba::TaskContextServer::DestroyOrb (  )  [static]

Invoke this method once to cleanup the orb.

Definition at line 362 of file TaskContextServer.cpp.

static void RTT::corba::TaskContextServer::DoShutdownOrb ( bool  wait_for_completion = true  )  [static, protected]

Internal shutdown function, used by both thread and ShutdownOrb.

void RTT::corba::TaskContextServer::DoShutdownOrb ( bool  wait_for_completion = true  )  [static, protected]

Internal shutdown function, used by both thread and ShutdownOrb.

Definition at line 272 of file TaskContextServer.cpp.

static std::string RTT::corba::TaskContextServer::getIOR ( TaskContext tc  )  [static]

Get the IOR of a given TaskContext

Parameters:
tc The TaskContext to find the IOR for
Returns:
IOR of the provided TaskContext or an empty string if the TaskContext is unknown
std::string RTT::corba::TaskContextServer::getIOR ( TaskContext tc  )  [static]

Get the IOR of a given TaskContext

Parameters:
tc The TaskContext to find the IOR for
Returns:
IOR of the provided TaskContext or an empty string if the TaskContext is unknown

Definition at line 447 of file TaskContextServer.cpp.

static void RTT::corba::TaskContextServer::RunOrb (  )  [static]

Invoke this method to run the orb and accept client requests. Use ShutdownOrb() to break out of this method.

void RTT::corba::TaskContextServer::RunOrb (  )  [static]

Invoke this method to run the orb and accept client requests. Use ShutdownOrb() to break out of this method.

Definition at line 300 of file TaskContextServer.cpp.

CTaskContext_ptr RTT::corba::TaskContextServer::server (  )  const

Get the Corba Object of this TaskContext. If you want to store this reference, you must _duplicate it. This object universally identifies the remote TaskContextServer and can be used to tell other (remote) objects where to find it.

corba::CTaskContext_ptr RTT::corba::TaskContextServer::server (  )  const

Get the Corba Object of this TaskContext. If you want to store this reference, you must _duplicate it. This object universally identifies the remote TaskContextServer and can be used to tell other (remote) objects where to find it.

Definition at line 441 of file TaskContextServer.cpp.

static void RTT::corba::TaskContextServer::ShutdownOrb ( bool  wait_for_completion = true  )  [static]

Invoke this method once to shutdown the Orb which is running the task servers in RunOrb(). When this function returns, no CORBA invocations are in progress, unless wait_for_completion is false.

void RTT::corba::TaskContextServer::ShutdownOrb ( bool  wait_for_completion = true  )  [static]

Invoke this method once to shutdown the Orb which is running the task servers in RunOrb(). When this function returns, no CORBA invocations are in progress, unless wait_for_completion is false.

Definition at line 266 of file TaskContextServer.cpp.

static void RTT::corba::TaskContextServer::ThreadOrb (  )  [static]

Invoke this method to run the orb in a separate thread and accept client requests from that thread. Use ShutdownOrb() to break out of this method.

void RTT::corba::TaskContextServer::ThreadOrb (  )  [static]

Invoke this method to run the orb in a separate thread and accept client requests from that thread. Use ShutdownOrb() to break out of this method.

Definition at line 345 of file TaskContextServer.cpp.


Friends And Related Function Documentation

OrbRunner [friend]
TaskContextProxy [friend]

Member Data Documentation

static IorMap RTT::corba::TaskContextServer::iors [static, protected]
static bool RTT::corba::TaskContextServer::is_shutdown = false [static, protected]
PortableServer::POA_var RTT::corba::TaskContextServer::mpoa [protected]
PortableServer::ServantBase_var RTT::corba::TaskContextServer::mtask_i [protected]

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


rtt
Author(s): RTT Developers
autogenerated on Fri Jan 11 09:49:55 2013