#include <LifespanStrategyTransient.h>
Inheritance diagram for TAO::Portable_Server::LifespanStrategyTransient:


Public Member Functions | |
| LifespanStrategyTransient (void) | |
| 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 | |
| TAO::Portable_Server::Creation_Time | creation_time_ |
|
|
Definition at line 22 of file LifespanStrategyTransient.cpp.
00022 : 00023 creation_time_ (ACE_OS::gettimeofday ()) 00024 { 00025 } |
|
|
Check the state of the POA.
Implements TAO::Portable_Server::LifespanStrategy. Definition at line 92 of file LifespanStrategyTransient.cpp. References TAO_POA_Manager::check_state(), TAO_POA_Manager::get_state_i(), and TAO_Root_POA::tao_poa_manager().
00093 {
00094 if (this->poa_->tao_poa_manager ().get_state_i () ==
00095 PortableServer::POAManager::INACTIVE)
00096 {
00097 throw ::CORBA::OBJECT_NOT_EXIST (CORBA::OMGVMCID | 4, CORBA::COMPLETED_NO);
00098 }
00099 else
00100 {
00101 this->poa_->tao_poa_manager ().check_state ();
00102 }
00103 }
|
|
||||||||||||
|
Implements TAO::Portable_Server::LifespanStrategy. Definition at line 67 of file LifespanStrategyTransient.cpp. References key_type(), TAO::Portable_Server::LifespanStrategy::key_type_length(), and ACE_OS::memcpy().
00069 {
00070 // Copy the persistence byte.
00071 buffer[starting_at] = (CORBA::Octet)this->key_type ();
00072 starting_at += this->key_type_length ();
00073
00074 #if (POA_NO_TIMESTAMP == 0)
00075 // Then copy the timestamp for transient POAs.
00076 ACE_OS::memcpy (&buffer[starting_at],
00077 this->creation_time_.creation_time (),
00078 TAO::Portable_Server::Creation_Time::creation_time_length
00079 ());
00080 starting_at += TAO::Portable_Server::Creation_Time::creation_time_length
00081 ();
00082 #endif /* POA_NO_TIMESTAMP */
00083 }
|
|
|
Do we have set persistent or not,.
Implements TAO::Portable_Server::LifespanStrategy. Definition at line 38 of file LifespanStrategyTransient.cpp.
00039 {
00040 return false;
00041 }
|
|
|
Returns the length of the key type Implements TAO::Portable_Server::LifespanStrategy. Definition at line 53 of file LifespanStrategyTransient.cpp.
00054 {
00055 CORBA::ULong keylength = sizeof (char);
00056
00057 #if (POA_NO_TIMESTAMP == 0)
00058 // Calculate the space required for the timestamp.
00059 keylength += TAO::Portable_Server::Creation_Time::creation_time_length
00060 ();
00061 #endif /* POA_NO_TIMESTAMP */
00062
00063 return keylength;
00064 }
|
|
|
Definition at line 86 of file LifespanStrategyTransient.cpp. Referenced by create_key().
00087 {
00088 return 'T';
00089 }
|
|
|
Implements TAO::Portable_Server::LifespanStrategy. Definition at line 33 of file LifespanStrategyTransient.cpp.
00034 {
00035 }
|
|
|
Implements TAO::Portable_Server::LifespanStrategy. Definition at line 28 of file LifespanStrategyTransient.cpp.
00029 {
00030 }
|
|
|
Implements TAO::Portable_Server::LifespanStrategy. Definition at line 112 of file LifespanStrategyTransient.cpp.
00113 {
00114 return ::PortableServer::TRANSIENT;
00115 }
|
|
|
Implements TAO::Portable_Server::LifespanStrategy. Definition at line 106 of file LifespanStrategyTransient.cpp.
00107 {
00108 return false;
00109 }
|
|
||||||||||||
|
Validate whether this matches the set lifespan strategy.
Implements TAO::Portable_Server::LifespanStrategy. Definition at line 44 of file LifespanStrategyTransient.cpp. References creation_time_.
00048 {
00049 return (!is_persistent && this->creation_time_ == creation_time);
00050 }
|
|
|
Definition at line 62 of file LifespanStrategyTransient.h. Referenced by validate(). |
1.3.6