Public Types |
typedef CORBA::Object | _stub_type |
| Useful for template programming.
|
typedef CORBA::Object_ptr | _stub_ptr_type |
typedef CORBA::Object_var | _stub_var_type |
Public Member Functions |
virtual | ~TAO_ServantBase (void) |
| Destructor.
|
virtual PortableServer::POA_ptr | _default_POA (void) |
| Returns the default POA for this servant.
|
virtual CORBA::Boolean | _is_a (const char *logical_type_id) |
| Local implementation of the CORBA::Object::_is_a method.
|
virtual CORBA::Boolean | _non_existent (void) |
| Default _non_existent: always returns false.
|
virtual CORBA::InterfaceDef_ptr | _get_interface (void) |
| Query the Interface Repository for the interface definition.
|
virtual CORBA::Object_ptr | _get_component (void) |
| Default _get_component: always returns CORBA::Object::_nil().
|
virtual char * | _repository_id (void) |
| Get the repository id.
|
virtual TAO_Stub * | _create_stub (void) |
| This is an auxiliary method for _this() and _narrow().
|
virtual void | _dispatch (TAO_ServerRequest &request, TAO::Portable_Server::Servant_Upcall *servant_upcall)=0 |
virtual int | _find (const char *opname, TAO_Skeleton &skelfunc, const size_t length=0) |
virtual int | _find (const char *opname, TAO_Collocated_Skeleton &skelfunc, TAO::Collocation_Strategy st, const size_t length=0) |
virtual const char * | _interface_repository_id (void) const =0 |
| Get this interface's repository id (TAO specific).
|
virtual void | _collocated_dispatch (::CORBA::Object_ptr obj,::CORBA::Object_out forward_obj, bool &is_forwarded, TAO::Argument **args, int num_args, const char *op, size_t op_len, TAO::Collocation_Strategy strategy) |
|
virtual void | _add_ref (void) |
| Increase reference count by one.
|
virtual void | _remove_ref (void) |
virtual CORBA::ULong | _refcount_value (void) const |
Static Public Member Functions |
static void | _is_a_skel (TAO_ServerRequest &req, TAO::Portable_Server::Servant_Upcall *servant_upcall, TAO_ServantBase *servant) |
static void | _is_a_thru_poa_skel (TAO_ServerRequest &server_request, TAO::Portable_Server::Servant_Upcall *servant_upcall, TAO_ServantBase *servant) |
static void | _non_existent_skel (TAO_ServerRequest &req, TAO::Portable_Server::Servant_Upcall *servant_upcall, TAO_ServantBase *servant) |
static void | _non_existent_thru_poa_skel (TAO_ServerRequest &server_request, TAO::Portable_Server::Servant_Upcall *servant_upcall, TAO_ServantBase *servant) |
static void | _interface_skel (TAO_ServerRequest &req, TAO::Portable_Server::Servant_Upcall *servant_upcall, TAO_ServantBase *servant) |
static void | _component_skel (TAO_ServerRequest &req, TAO::Portable_Server::Servant_Upcall *servant_upcall, TAO_ServantBase *servant) |
static void | _component_thru_poa_skel (TAO_ServerRequest &server_request, TAO::Portable_Server::Servant_Upcall *servant_upcall, TAO_ServantBase *servant) |
static void | _repository_id_skel (TAO_ServerRequest &req, TAO::Portable_Server::Servant_Upcall *servant_upcall, TAO_ServantBase *servant) |
static void | _repository_id_thru_poa_skel (TAO_ServerRequest &server_request, TAO::Portable_Server::Servant_Upcall *servant_upcall, TAO_ServantBase *servant) |
Protected Member Functions |
| TAO_ServantBase (void) |
| Default constructor, only derived classes can be created.
|
| TAO_ServantBase (const TAO_ServantBase &) |
| Copy constructor, protected so no instances can be created.
|
TAO_ServantBase & | operator= (const TAO_ServantBase &) |
| Assignment operator.
|
void | synchronous_upcall_dispatch (TAO_ServerRequest &req, TAO::Portable_Server::Servant_Upcall *servant_upcall, TAO_ServantBase *derived_this) |
void | asynchronous_upcall_dispatch (TAO_ServerRequest &req, TAO::Portable_Server::Servant_Upcall *servant_upcall, TAO_ServantBase *derived_this) |
Protected Attributes |
ACE_Atomic_Op< TAO_SYNCH_MUTEX,
unsigned long > | ref_count_ |
| Reference counter.
|
TAO_Operation_Table * | optable_ |
Base class for skeletons and servants.
The POA spec requires that all servants inherit from this class' base class.
An instance of a servant class derived from ServantBase initially has a reference count of one. Invoking _add_ref on the servant instance increases its reference count by one. Invoking _remove_ref on the servant instance decreases its reference count by one; if the resulting reference count equals zero, _remove_ref invokes delete on its this pointer in order to destroy the servant. For ORBs that operate in multi-threaded environments, the implementations of _add_ref and _remove_ref that the ServantBase class provides shall be thread-safe.
Like ServantBase supports copy construction and the default assignment operation. Copy construction always sets the reference count of the new servant instance to one. The default assignment implementation merely returns *this and does not affect the reference count.