#include <LifespanStrategyPersistent.h>
Public Member Functions | |
LifespanStrategyPersistent () | |
virtual void | strategy_init (TAO_Root_POA *poa) |
virtual void | notify_startup (void) |
virtual void | notify_shutdown (void) |
char | key_type (void) const |
virtual CORBA::Boolean | is_persistent (void) const |
Do we have set persistent or not,. | |
CORBA::ULong | key_length (void) const |
virtual void | create_key (CORBA::Octet *buffer, CORBA::ULong &starting_at) |
virtual bool | validate (CORBA::Boolean is_persistent, const TAO::Portable_Server::Temporary_Creation_Time &creation_time) const |
Validate whether this matches the set lifespan strategy. | |
virtual void | check_state (void) |
Check the state of the POA. | |
virtual ::PortableServer::LifespanPolicyValue | type () const |
virtual bool | use_imr () const |
Private Attributes | |
bool | use_imr_ |
Definition at line 33 of file LifespanStrategyPersistent.h.
TAO::Portable_Server::LifespanStrategyPersistent::LifespanStrategyPersistent | ( | ) |
Definition at line 109 of file LifespanStrategyPersistent.cpp.
void TAO::Portable_Server::LifespanStrategyPersistent::check_state | ( | void | ) | [virtual] |
Check the state of the POA.
Implements TAO::Portable_Server::LifespanStrategy.
Definition at line 115 of file LifespanStrategyPersistent.cpp.
{ ImR_Client_Adapter *adapter = ACE_Dynamic_Service<ImR_Client_Adapter>::instance ( TAO_Root_POA::imr_client_adapter_name ()
void TAO::Portable_Server::LifespanStrategyPersistent::create_key | ( | CORBA::Octet * | buffer, | |
CORBA::ULong & | starting_at | |||
) | [virtual] |
Implements TAO::Portable_Server::LifespanStrategy.
Definition at line 34 of file LifespanStrategyPersistent.cpp.
{ return is_persistent; } char LifespanStrategyPersistent::key_type (void) const {
CORBA::Boolean TAO::Portable_Server::LifespanStrategyPersistent::is_persistent | ( | void | ) | const [virtual] |
Do we have set persistent or not,.
Implements TAO::Portable_Server::LifespanStrategy.
Definition at line 28 of file LifespanStrategyPersistent.cpp.
CORBA::ULong TAO::Portable_Server::LifespanStrategyPersistent::key_length | ( | void | ) | const [virtual] |
Returns the length of the key type
Implements TAO::Portable_Server::LifespanStrategy.
Definition at line 44 of file LifespanStrategyPersistent.cpp.
{
char TAO::Portable_Server::LifespanStrategyPersistent::key_type | ( | void | ) | const |
Definition at line 22 of file LifespanStrategyPersistent.cpp.
{ void LifespanStrategyPersistent::strategy_init (TAO_Root_POA *poa) {
void TAO::Portable_Server::LifespanStrategyPersistent::notify_shutdown | ( | void | ) | [virtual] |
Implements TAO::Portable_Server::LifespanStrategy.
Definition at line 96 of file LifespanStrategyPersistent.cpp.
{ adapter->imr_notify_startup (this->poa_); } else { // When we don't have a ImR_Client adapter, but the user // has specified that the ImR has to be used we have an // error situation which has to be reported. ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%P|%t) ERROR: No ImR_Client library ") ACE_TEXT ("available but use IMR has been specified.\n")));
void TAO::Portable_Server::LifespanStrategyPersistent::notify_startup | ( | void | ) | [virtual] |
Implements TAO::Portable_Server::LifespanStrategy.
Definition at line 50 of file LifespanStrategyPersistent.cpp.
{ // Copy the persistence byte. buffer[starting_at] = static_cast<CORBA::Octet> (this->key_type ()); starting_at += this->key_type_length (); } CORBA::ULong LifespanStrategyPersistent::key_length () const { return this->key_type_length (); } void LifespanStrategyPersistent::notify_startup (void) { if (this->use_imr_) { // The user specified that the ImR should be used. ImR_Client_Adapter *adapter = ACE_Dynamic_Service<ImR_Client_Adapter>::instance ( TAO_Root_POA::imr_client_adapter_name () ); #if !defined (TAO_AS_STATIC_LIBS) // In case we build shared, try to load the ImR Client library, in a // static build we just can't do this, so don't try it, lower layers // output an error then. if (adapter == 0) { ACE_Service_Config::process_directive ( ACE_DYNAMIC_SERVICE_DIRECTIVE( "ImR_Client_Adapter", "TAO_ImR_Client", "_make_ImR_Client_Adapter_Impl", "")); adapter = ACE_Dynamic_Service<ImR_Client_Adapter>::instance ( TAO_Root_POA::imr_client_adapter_name ()); } #endif /* !TAO_AS_STATIC_LIBS */
void TAO::Portable_Server::LifespanStrategyPersistent::strategy_init | ( | TAO_Root_POA * | poa | ) | [virtual] |
Reimplemented from TAO::Portable_Server::LifespanStrategy.
Definition at line 6 of file LifespanStrategyPersistent.cpp.
: LifespanStrategyPersistent.cpp 76898 2007-02-04 18:58:07Z johnnyw $") #include "tao/PortableServer/Root_POA.h" #include "tao/PortableServer/POAManager.h" #include "tao/PortableServer/ImR_Client_Adapter.h"
PortableServer::LifespanPolicyValue TAO::Portable_Server::LifespanStrategyPersistent::type | ( | void | ) | const [virtual] |
Implements TAO::Portable_Server::LifespanStrategy.
Definition at line 121 of file LifespanStrategyPersistent.cpp.
{ adapter->imr_notify_shutdown (this->poa_); }
bool TAO::Portable_Server::LifespanStrategyPersistent::use_imr | ( | ) | const [virtual] |
Implements TAO::Portable_Server::LifespanStrategy.
Definition at line 127 of file LifespanStrategyPersistent.cpp.
: use_imr_ (true) { }
bool TAO::Portable_Server::LifespanStrategyPersistent::validate | ( | CORBA::Boolean | is_persistent, | |
const TAO::Portable_Server::Temporary_Creation_Time & | creation_time | |||
) | const [virtual] |
Validate whether this matches the set lifespan strategy.
Implements TAO::Portable_Server::LifespanStrategy.
Definition at line 14 of file LifespanStrategyPersistent.cpp.
{
bool TAO::Portable_Server::LifespanStrategyPersistent::use_imr_ [private] |
Definition at line 65 of file LifespanStrategyPersistent.h.