3 //=============================================================================
5 * @file Connection_Timeout_Policy_i.h
7 * @author Balachandran Natarajan (bala@cs.wustl.edu)
9 //=============================================================================
11 #ifndef TAO_CONNECTION_TIMEOUT_POLICY_I_H
12 #define TAO_CONNECTION_TIMEOUT_POLICY_I_H
14 #include /**/ "ace/pre.h"
16 #include "tao/orbconf.h"
18 #if !defined (ACE_LACKS_PRAGMA_ONCE)
20 #endif /* ACE_LACKS_PRAGMA_ONCE */
22 #include "tao/Messaging/TAO_ExtC.h"
23 #include "tao/LocalObject.h"
27 #pragma warning(disable:4250)
31 #if (TAO_HAS_CONNECTION_TIMEOUT_POLICY == 1)
33 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
36 * @class TAO_ConnectionTimeoutPolicy
38 * @brief TAO::ConnectionTimeoutPolicy implementation
40 * This policy controls the connection timeout time while
41 * establishing connections. This policy is proprietary to TAO.
43 class TAO_ConnectionTimeoutPolicy
44 : public TAO::ConnectionTimeoutPolicy
,
45 public ::CORBA::LocalObject
49 TAO_ConnectionTimeoutPolicy (const TimeBase::TimeT
& relative_expiry
);
52 TAO_ConnectionTimeoutPolicy (const TAO_ConnectionTimeoutPolicy
&rhs
);
54 /// Implement the timeout hook, this is set in the ORB_Core at
55 /// initialization time.
56 static void hook (TAO_ORB_Core
*orb_core
,
59 ACE_Time_Value
&time_value
);
61 /// Helper method for the implementation of
62 /// CORBA::ORB::create_policy.
63 static CORBA::Policy_ptr
create (const CORBA::Any
& val
);
65 /// Returns a copy of <this>.
66 virtual TAO_ConnectionTimeoutPolicy
*clone () const;
68 // = The TAO::ConnectionTinoutPolicy methods
69 virtual TimeBase::TimeT
relative_expiry ();
71 virtual CORBA::PolicyType
policy_type ();
73 virtual CORBA::Policy_ptr
copy ();
75 virtual void destroy ();
77 /// Change the CORBA representation to the ACE representation.
78 void set_time_value (ACE_Time_Value
&time_value
);
80 /// Return the cached policy type for this policy.
81 virtual TAO_Cached_Policy_Type
_tao_cached_type () const;
85 TimeBase::TimeT relative_expiry_
;
88 TAO_END_VERSIONED_NAMESPACE_DECL
90 #endif /* TAO_HAS_RELATIVE_ROUNDTRIP_TIMEOUT_POLICY == 1 */
96 #include /**/ "ace/post.h"
98 #endif /* TAO_CONNECTION_TIMEOUT_POLICY_I_H */