00001 // -*- C++ -*- 00002 00003 //============================================================================= 00004 /** 00005 * @file LifespanStrategyPersistent.h 00006 * 00007 * $Id: LifespanStrategyPersistent.h 76551 2007-01-24 13:42:44Z johnnyw $ 00008 * 00009 * @author Johnny Willemsen <jwillemsen@remedy.nl> 00010 */ 00011 //============================================================================= 00012 00013 #ifndef TAO_LIFESPANSTRATEGYPERSISTENT_H 00014 #define TAO_LIFESPANSTRATEGYPERSISTENT_H 00015 #include /**/ "ace/pre.h" 00016 00017 #include "tao/PortableServer/LifespanStrategy.h" 00018 00019 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00020 # pragma once 00021 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00022 00023 #include "tao/Object_KeyC.h" 00024 00025 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00026 00027 class ServerObject_i; 00028 00029 namespace TAO 00030 { 00031 namespace Portable_Server 00032 { 00033 class LifespanStrategyPersistent 00034 : public LifespanStrategy 00035 { 00036 public: 00037 LifespanStrategyPersistent (); 00038 00039 virtual void strategy_init(TAO_Root_POA *poa); 00040 00041 virtual void notify_startup (void); 00042 00043 virtual void notify_shutdown (void); 00044 00045 char key_type (void) const; 00046 00047 virtual CORBA::Boolean is_persistent (void) const; 00048 00049 CORBA::ULong key_length (void) const; 00050 00051 virtual void create_key (CORBA::Octet *buffer, CORBA::ULong& starting_at); 00052 00053 virtual bool 00054 validate (CORBA::Boolean is_persistent, 00055 const TAO::Portable_Server::Temporary_Creation_Time& creation_time) const; 00056 00057 /// Check the state of the POA. 00058 virtual void check_state (void); 00059 00060 virtual ::PortableServer::LifespanPolicyValue type() const; 00061 00062 virtual bool use_imr () const; 00063 00064 private: 00065 bool use_imr_; 00066 }; 00067 } /* namespace Portable_Server */ 00068 } /* namespace TAO */ 00069 00070 TAO_END_VERSIONED_NAMESPACE_DECL 00071 00072 #include /**/ "ace/post.h" 00073 #endif /* TAO_LIFESPANSTRATEGYPERSISTENT_H */