#include <LifespanStrategyPersistent.h>
Inheritance diagram for TAO::Portable_Server::LifespanStrategyPersistent:
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 127 of file LifespanStrategyPersistent.cpp.
00127 : 00128 use_imr_ (true) 00129 { 00130 } |
|
Check the state of the POA.
Implements TAO::Portable_Server::LifespanStrategy. Definition at line 133 of file LifespanStrategyPersistent.cpp. References TAO_POA_Manager::check_state(), and TAO_Root_POA::tao_poa_manager().
00134 { 00135 this->poa_->tao_poa_manager().check_state (); 00136 } |
|
Implements TAO::Portable_Server::LifespanStrategy. Definition at line 52 of file LifespanStrategyPersistent.cpp. References key_type(), and TAO::Portable_Server::LifespanStrategy::key_type_length().
00055 { 00056 // Copy the persistence byte. 00057 buffer[starting_at] = static_cast<CORBA::Octet> (this->key_type ()); 00058 starting_at += this->key_type_length (); 00059 } |
|
Do we have set persistent or not,.
Implements TAO::Portable_Server::LifespanStrategy. Definition at line 46 of file LifespanStrategyPersistent.cpp.
00047 { 00048 return true; 00049 } |
|
Returns the length of the key type Implements TAO::Portable_Server::LifespanStrategy. Definition at line 62 of file LifespanStrategyPersistent.cpp. References TAO::Portable_Server::LifespanStrategy::key_type_length().
00063 { 00064 return this->key_type_length (); 00065 } |
|
Definition at line 40 of file LifespanStrategyPersistent.cpp. Referenced by create_key().
00041 { 00042 return 'P'; 00043 } |
|
Implements TAO::Portable_Server::LifespanStrategy. Definition at line 114 of file LifespanStrategyPersistent.cpp. References TAO::Portable_Server::ImR_Client_Adapter::imr_notify_shutdown(), and ACE_Dynamic_Service< TYPE >::instance().
00115 { 00116 ImR_Client_Adapter *adapter = 00117 ACE_Dynamic_Service<ImR_Client_Adapter>::instance ( 00118 TAO_Root_POA::imr_client_adapter_name () 00119 ); 00120 00121 if (adapter != 0) 00122 { 00123 adapter->imr_notify_shutdown (this->poa_); 00124 } 00125 } |
|
Implements TAO::Portable_Server::LifespanStrategy. Definition at line 68 of file LifespanStrategyPersistent.cpp. References ACE_DYNAMIC_SERVICE_DIRECTIVE, ACE_ERROR, ACE_TEXT(), TAO::Portable_Server::ImR_Client_Adapter::imr_notify_startup(), ACE_Dynamic_Service< TYPE >::instance(), LM_ERROR, ACE_Service_Config::process_directive(), and use_imr_.
00069 { 00070 if (this->use_imr_) 00071 { 00072 // The user specified that the ImR should be used. 00073 ImR_Client_Adapter *adapter = 00074 ACE_Dynamic_Service<ImR_Client_Adapter>::instance ( 00075 TAO_Root_POA::imr_client_adapter_name () 00076 ); 00077 00078 #if !defined (TAO_AS_STATIC_LIBS) 00079 // In case we build shared, try to load the ImR Client library, in a 00080 // static build we just can't do this, so don't try it, lower layers 00081 // output an error then. 00082 if (adapter == 0) 00083 { 00084 ACE_Service_Config::process_directive ( 00085 ACE_DYNAMIC_SERVICE_DIRECTIVE( 00086 "ImR_Client_Adapter", "TAO_ImR_Client", 00087 "_make_ImR_Client_Adapter_Impl", "")); 00088 00089 adapter = 00090 ACE_Dynamic_Service<ImR_Client_Adapter>::instance ( 00091 TAO_Root_POA::imr_client_adapter_name ()); 00092 } 00093 #endif /* !TAO_AS_STATIC_LIBS */ 00094 00095 if (adapter != 0) 00096 { 00097 adapter->imr_notify_startup (this->poa_); 00098 } 00099 else 00100 { 00101 // When we don't have a ImR_Client adapter, but the user 00102 // has specified that the ImR has to be used we have an 00103 // error situation which has to be reported. 00104 ACE_ERROR ((LM_ERROR, 00105 ACE_TEXT ("(%P|%t) ERROR: No ImR_Client library ") 00106 ACE_TEXT ("available but use IMR has been specified.\n"))); 00107 00108 throw ::CORBA::INTERNAL (); 00109 } 00110 } 00111 } |
|
Reimplemented from TAO::Portable_Server::LifespanStrategy. Definition at line 24 of file LifespanStrategyPersistent.cpp. References TAO_Root_POA::orb_core(), TAO_ORB_Core::use_implrepo(), and use_imr_.
00025 { 00026 LifespanStrategy::strategy_init (poa); 00027 00028 this->use_imr_ = this->poa_->orb_core ().use_implrepo (); 00029 } |
|
Implements TAO::Portable_Server::LifespanStrategy. Definition at line 139 of file LifespanStrategyPersistent.cpp.
00140 { 00141 return ::PortableServer::PERSISTENT; 00142 } |
|
Implements TAO::Portable_Server::LifespanStrategy. Definition at line 145 of file LifespanStrategyPersistent.cpp. References use_imr_.
00146 { 00147 return use_imr_; 00148 } |
|
Validate whether this matches the set lifespan strategy.
Implements TAO::Portable_Server::LifespanStrategy. Definition at line 32 of file LifespanStrategyPersistent.cpp.
00035 {
00036 return is_persistent;
00037 }
|
|
Definition at line 65 of file LifespanStrategyPersistent.h. Referenced by notify_startup(), strategy_init(), and use_imr(). |