Public Member Functions | Protected Attributes

TAO::Portable_Server::ServantRetentionStrategyNonRetain Class Reference

#include <ServantRetentionStrategyNonRetain.h>

Inheritance diagram for TAO::Portable_Server::ServantRetentionStrategyNonRetain:
Inheritance graph
[legend]
Collaboration diagram for TAO::Portable_Server::ServantRetentionStrategyNonRetain:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 ServantRetentionStrategyNonRetain (void)
virtual void strategy_init (TAO_Root_POA *poa)
virtual void strategy_cleanup (void)
CORBA::ULong waiting_servant_deactivation (void) const
virtual PortableServer::ObjectIdactivate_object (PortableServer::Servant servant, CORBA::Short priority, bool &wait_occurred_restart_call)
virtual void activate_object_with_id (const PortableServer::ObjectId &id, PortableServer::Servant servant, CORBA::Short priority, bool &wait_occurred_restart_call)
virtual void deactivate_object (const PortableServer::ObjectId &id)
virtual PortableServer::Servant find_servant (const PortableServer::ObjectId &system_id)
virtual int is_servant_in_map (PortableServer::Servant servant, bool &wait_occurred_restart_call)
virtual PortableServer::ObjectIdsystem_id_to_object_id (const PortableServer::ObjectId &system_id)
virtual PortableServer::Servant user_id_to_servant (const PortableServer::ObjectId &id)
CORBA::Object_ptr id_to_reference (const PortableServer::ObjectId &id, bool indirect)
virtual TAO_SERVANT_LOCATION servant_present (const PortableServer::ObjectId &system_id, PortableServer::Servant &servant)
virtual PortableServer::Servant find_servant (const PortableServer::ObjectId &system_id, TAO::Portable_Server::Servant_Upcall &servant_upcall, TAO::Portable_Server::POA_Current_Impl &poa_current_impl)
virtual int find_servant_priority (const PortableServer::ObjectId &system_id, CORBA::Short &priority)
virtual void deactivate_all_objects (void)
virtual PortableServer::ObjectIdservant_to_user_id (PortableServer::Servant servant)
virtual CORBA::Object_ptr servant_to_reference (PortableServer::Servant servant)
virtual CORBA::Object_ptr create_reference (const char *intf, CORBA::Short priority)
virtual CORBA::Object_ptr create_reference_with_id (const PortableServer::ObjectId &oid, const char *intf, CORBA::Short priority)
virtual int rebind_using_user_id_and_system_id (PortableServer::Servant servant, const PortableServer::ObjectId &user_id, const PortableServer::ObjectId &system_id, TAO::Portable_Server::Servant_Upcall &servant_upcall)
virtual CORBA::Boolean servant_has_remaining_activations (PortableServer::Servant servant)
virtual int unbind_using_user_id (const PortableServer::ObjectId &user_id)
virtual
::PortableServer::ServantRetentionPolicyValue 
type () const

Protected Attributes

TAO_Root_POApoa_

Detailed Description

Definition at line 33 of file ServantRetentionStrategyNonRetain.h.


Constructor & Destructor Documentation

TAO::Portable_Server::ServantRetentionStrategyNonRetain::ServantRetentionStrategyNonRetain ( void   ) 

Definition at line 14 of file ServantRetentionStrategyNonRetain.cpp.

               : ServantRetentionStrategyNonRetain.cpp 88564 2010-01-15 09:56:57Z johnnyw $")


Member Function Documentation

PortableServer::ObjectId * TAO::Portable_Server::ServantRetentionStrategyNonRetain::activate_object ( PortableServer::Servant  servant,
CORBA::Short  priority,
bool &  wait_occurred_restart_call 
) [virtual]

Implements TAO::Portable_Server::ServantRetentionStrategy.

Reimplemented in TAO::Portable_Server::ServantRetentionStrategyRetain.

Definition at line 143 of file ServantRetentionStrategyNonRetain.cpp.

    {
      throw PortableServer::POA::WrongPolicy ();
    }

void TAO::Portable_Server::ServantRetentionStrategyNonRetain::activate_object_with_id ( const PortableServer::ObjectId id,
PortableServer::Servant  servant,
CORBA::Short  priority,
bool &  wait_occurred_restart_call 
) [virtual]

Implements TAO::Portable_Server::ServantRetentionStrategy.

Reimplemented in TAO::Portable_Server::ServantRetentionStrategyRetain.

Definition at line 152 of file ServantRetentionStrategyNonRetain.cpp.

    {
      throw PortableServer::POA::WrongPolicy ();
    }

    PortableServer::ObjectId *
    ServantRetentionStrategyNonRetain::activate_object (

CORBA::Object_ptr TAO::Portable_Server::ServantRetentionStrategyNonRetain::create_reference ( const char *  intf,
CORBA::Short  priority 
) [virtual]

Implements TAO::Portable_Server::ServantRetentionStrategy.

Reimplemented in TAO::Portable_Server::ServantRetentionStrategyRetain.

Definition at line 162 of file ServantRetentionStrategyNonRetain.cpp.

    {
      throw PortableServer::POA::WrongPolicy ();
    }

    void
    ServantRetentionStrategyNonRetain::activate_object_with_id (
      const PortableServer::ObjectId &/*id*/,
      PortableServer::Servant /*servant*/,
      CORBA::Short /*priority*/,
      bool &/*wait_occurred_restart_call*/)
    {
      throw PortableServer::POA::WrongPolicy ();
    }

    CORBA::Object_ptr
    ServantRetentionStrategyNonRetain::create_reference (
      const char *intf,
      CORBA::Short priority)
    {
      // This operation creates an object reference that encapsulates a
      // POA-generated Object Id value and the specified interface
      // repository id. This operation does not cause an activation to
      // take place. The resulting reference may be passed to clients, so
      // that subsequent requests on those references will cause the
      // appropriate servant manager to be invoked, if one is
      // available. The generated Object Id value may be obtained by
      // invoking POA::reference_to_id with the created reference.

      PortableServer::ObjectId_var system_id;
      PortableServer::ObjectId user_id;

      // Otherwise, it is the NON_RETAIN policy.  Therefore, any ol'
      // object id will do (even an empty one).
      PortableServer::ObjectId *sys_id = 0;
      ACE_NEW_THROW_EX (sys_id,
                        PortableServer::ObjectId,
                        CORBA::NO_MEMORY ());

CORBA::Object_ptr TAO::Portable_Server::ServantRetentionStrategyNonRetain::create_reference_with_id ( const PortableServer::ObjectId oid,
const char *  intf,
CORBA::Short  priority 
) [virtual]

Implements TAO::Portable_Server::ServantRetentionStrategy.

Reimplemented in TAO::Portable_Server::ServantRetentionStrategyRetain.

Definition at line 203 of file ServantRetentionStrategyNonRetain.cpp.

    {
      // This operation creates an object reference that encapsulates the
      // specified Object Id and interface repository Id values. This
      // operation does not cause an activation to take place.  The
      // resulting reference may be passed to clients, so that subsequent
      // requests on those references will cause the object to be
      // activated if necessary, or the default servant used, depending on
      // the applicable policies.

      PortableServer::Servant servant = 0;
      PortableServer::ObjectId_var system_id;

      // Otherwise, it is the NON_RETAIN policy.  Therefore, user id
      // is the same as system id.
      PortableServer::ObjectId *sys_id = 0;

void TAO::Portable_Server::ServantRetentionStrategyNonRetain::deactivate_all_objects ( void   )  [virtual]
void TAO::Portable_Server::ServantRetentionStrategyNonRetain::deactivate_object ( const PortableServer::ObjectId id  )  [virtual]

Implements TAO::Portable_Server::ServantRetentionStrategy.

Reimplemented in TAO::Portable_Server::ServantRetentionStrategyRetain.

Definition at line 32 of file ServantRetentionStrategyNonRetain.cpp.

    {
    }

    void
    ServantRetentionStrategyNonRetain::strategy_init (TAO_Root_POA *poa)
    {
      poa_ = poa;

PortableServer::Servant TAO::Portable_Server::ServantRetentionStrategyNonRetain::find_servant ( const PortableServer::ObjectId system_id,
TAO::Portable_Server::Servant_Upcall &  servant_upcall,
TAO::Portable_Server::POA_Current_Impl &  poa_current_impl 
) [virtual]

Implements TAO::Portable_Server::ServantRetentionStrategy.

Reimplemented in TAO::Portable_Server::ServantRetentionStrategyRetain.

Definition at line 85 of file ServantRetentionStrategyNonRetain.cpp.

    {
      throw PortableServer::POA::WrongPolicy ();
    }

    TAO_SERVANT_LOCATION
    ServantRetentionStrategyNonRetain::servant_present (
      const PortableServer::ObjectId &/*system_id*/,
      PortableServer::Servant &/*servant*/)
    {
      return TAO_SERVANT_NOT_FOUND;
    }

PortableServer::Servant TAO::Portable_Server::ServantRetentionStrategyNonRetain::find_servant ( const PortableServer::ObjectId system_id  )  [virtual]
int TAO::Portable_Server::ServantRetentionStrategyNonRetain::find_servant_priority ( const PortableServer::ObjectId system_id,
CORBA::Short priority 
) [virtual]

Implements TAO::Portable_Server::ServantRetentionStrategy.

Reimplemented in TAO::Portable_Server::ServantRetentionStrategyRetain.

Definition at line 102 of file ServantRetentionStrategyNonRetain.cpp.

    {
      // We have the NON_RETAIN policy, user id is the system id.

CORBA::Object_ptr TAO::Portable_Server::ServantRetentionStrategyNonRetain::id_to_reference ( const PortableServer::ObjectId id,
bool  indirect 
) [virtual]
int TAO::Portable_Server::ServantRetentionStrategyNonRetain::is_servant_in_map ( PortableServer::Servant  servant,
bool &  wait_occurred_restart_call 
) [virtual]
int TAO::Portable_Server::ServantRetentionStrategyNonRetain::rebind_using_user_id_and_system_id ( PortableServer::Servant  servant,
const PortableServer::ObjectId user_id,
const PortableServer::ObjectId system_id,
TAO::Portable_Server::Servant_Upcall &  servant_upcall 
) [virtual]
CORBA::Boolean TAO::Portable_Server::ServantRetentionStrategyNonRetain::servant_has_remaining_activations ( PortableServer::Servant  servant  )  [virtual]
TAO_SERVANT_LOCATION TAO::Portable_Server::ServantRetentionStrategyNonRetain::servant_present ( const PortableServer::ObjectId system_id,
PortableServer::Servant servant 
) [virtual]

Implements TAO::Portable_Server::ServantRetentionStrategy.

Reimplemented in TAO::Portable_Server::ServantRetentionStrategyRetain.

Definition at line 77 of file ServantRetentionStrategyNonRetain.cpp.

    {
      throw PortableServer::POA::WrongPolicy ();
    }

CORBA::Object_ptr TAO::Portable_Server::ServantRetentionStrategyNonRetain::servant_to_reference ( PortableServer::Servant  servant  )  [virtual]
PortableServer::ObjectId * TAO::Portable_Server::ServantRetentionStrategyNonRetain::servant_to_user_id ( PortableServer::Servant  servant  )  [virtual]
void TAO::Portable_Server::ServantRetentionStrategyNonRetain::strategy_cleanup ( void   )  [virtual]

Implements TAO::Portable_Server::Policy_Strategy.

Reimplemented in TAO::Portable_Server::ServantRetentionStrategyRetain.

Definition at line 26 of file ServantRetentionStrategyNonRetain.cpp.

{
  namespace Portable_Server
  {

void TAO::Portable_Server::ServantRetentionStrategyNonRetain::strategy_init ( TAO_Root_POA poa  )  [virtual]

Implements TAO::Portable_Server::Policy_Strategy.

Reimplemented in TAO::Portable_Server::ServantRetentionStrategyRetain.

Definition at line 20 of file ServantRetentionStrategyNonRetain.cpp.

               : ServantRetentionStrategyNonRetain.cpp 88564 2010-01-15 09:56:57Z johnnyw $")

PortableServer::ObjectId * TAO::Portable_Server::ServantRetentionStrategyNonRetain::system_id_to_object_id ( const PortableServer::ObjectId system_id  )  [virtual]

Implements TAO::Portable_Server::ServantRetentionStrategy.

Reimplemented in TAO::Portable_Server::ServantRetentionStrategyRetain.

Definition at line 48 of file ServantRetentionStrategyNonRetain.cpp.

    {
      // When using Non_Retain we don't have an active object map and we just
      // can't deactivate any object
      throw PortableServer::POA::WrongPolicy ();
    }

    PortableServer::Servant
    ServantRetentionStrategyNonRetain::find_servant (
      const PortableServer::ObjectId &/*system_id*/)
    {

PortableServer::ServantRetentionPolicyValue TAO::Portable_Server::ServantRetentionStrategyNonRetain::type ( void   )  const [virtual]
int TAO::Portable_Server::ServantRetentionStrategyNonRetain::unbind_using_user_id ( const PortableServer::ObjectId user_id  )  [virtual]
PortableServer::Servant TAO::Portable_Server::ServantRetentionStrategyNonRetain::user_id_to_servant ( const PortableServer::ObjectId id  )  [virtual]
CORBA::ULong TAO::Portable_Server::ServantRetentionStrategyNonRetain::waiting_servant_deactivation ( void   )  const [virtual]

Member Data Documentation

TAO_Root_POA* TAO::Portable_Server::ServantRetentionStrategyNonRetain::poa_ [protected]

Definition at line 124 of file ServantRetentionStrategyNonRetain.h.


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