4 #include /**/ "ace/pre.h"
6 #if !defined (ACE_LACKS_PRAGMA_ONCE)
8 #endif /* ACE_LACKS_PRAGMA_ONCE */
10 #if TAO_HAS_TRANSPORT_CURRENT == 1
12 #include "tao/TransportCurrent/TCC.h"
13 #include "tao/LocalObject.h"
15 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
29 * @brief Implementation of the TAO::Transport::Current
32 * Current_Impl is useful for obtaining information about the
33 * Transport, associated with the calling thread.
35 class TAO_Transport_Current_Export Current_Impl
36 : public virtual Current
37 , public virtual ::CORBA::LocalObject
41 Current_Impl (TAO_ORB_Core
* core
, size_t tss_slot_id
);
44 * These are methods exposed by the
45 * PortableInterceptor::Current interface.
48 virtual CORBA::Long
id ();
50 virtual CounterT
bytes_sent ();
52 virtual CounterT
bytes_received ();
54 virtual CounterT
messages_sent ();
56 virtual CounterT
messages_received ();
58 virtual ::TimeBase::TimeT
open_since ();
66 /// A (strategy) method used to obtain the transport ptr
67 const TAO_Transport
* transport () const;
69 /// A Stats instance. If protocol is unavailable (0) or the
70 /// TAO_HAS_TRANSPORT_CURRENT macro is defined as anything but
71 /// 1, a single static instance will be used.
72 const TAO::Transport::Stats
* transport_stats () const;
75 /// Destructor is protected to enforce the fact this class is
76 /// reference counted, and should not be destroyed using
77 /// delete() by anything other than the reference counting
79 virtual ~Current_Impl ();
82 Current_Impl (const Current_Impl
&) = delete;
83 void operator= (const Current_Impl
&) = delete;
86 // The ORB (core) that owes us.
89 // The ORB's TSS slot id for the Transport ptr
96 TAO_END_VERSIONED_NAMESPACE_DECL
98 #endif /* TAO_HAS_TRANSPORT_CURRENT == 1 */
101 #include /**/ "ace/post.h"
103 #endif /* CURRENT_IMPL_H */