00001 /** 00002 * @file IIOP_Current_Impl.h 00003 * 00004 * @brief Provide implementation for the IIOPTraits interface 00005 * 00006 * $Id: IIOP_Current_Impl.h 88803 2010-02-02 11:13:27Z vzykov $ 00007 * 00008 * @author Iliyan Jeliazkov <iliyan@ociweb.com> 00009 */ 00010 00011 #ifndef IIOP_CURRENT_IMPL_H 00012 #define IIOP_CURRENT_IMPL_H 00013 00014 #include /**/ "ace/pre.h" 00015 00016 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00017 # pragma once 00018 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00019 00020 #include "tao/orbconf.h" 00021 00022 #if TAO_HAS_TRANSPORT_CURRENT == 1 00023 00024 #include "tao/TransportCurrent/TC_IIOPC.h" 00025 #include "tao/TransportCurrent/Current_Impl.h" 00026 00027 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00028 00029 class TAO_Transport; 00030 class TAO_IIOP_Connection_Handler; 00031 00032 namespace TAO 00033 { 00034 namespace Transport 00035 { 00036 00037 /** 00038 * @class IIOP_Current_Impl 00039 * 00040 * @brief Implementation of the TAO::Transport::IIOPCurrent 00041 * interface. 00042 * 00043 * IIOP_Current_Impl is useful for obtaining information about the 00044 * IIOP Transport, associated with the calling thread. 00045 */ 00046 class TAO_Transport_Current_Export IIOP_Current_Impl 00047 : public virtual IIOP::Current 00048 , public virtual Current_Impl 00049 { 00050 public: 00051 00052 /// Constructor. 00053 IIOP_Current_Impl (TAO_ORB_Core* core, size_t tss_slot_id); 00054 00055 //@{ 00056 virtual ::CORBA::Long id (void); 00057 00058 virtual ::SSLIOP::Current_ptr ssliop_current (void); 00059 00060 virtual ::CORBA::Long remote_port (void); 00061 00062 virtual char* remote_host (void); 00063 00064 virtual ::CORBA::Long local_port (void); 00065 00066 virtual char* local_host (void); 00067 //@} 00068 00069 00070 protected: 00071 00072 /// Destructor 00073 /** 00074 * Protected destructor to enforce the fact this class is reference 00075 * counted, and should not be destroyed using delete() by anything 00076 * other than the reference counting mechanism. 00077 */ 00078 virtual ~IIOP_Current_Impl (void); 00079 00080 private: 00081 00082 /// Returns the IIOP connection handler associated with the 00083 /// Transport. Will throw NoContext if the (selected) transport 00084 /// () == 0, or if transport->connection_handler () == 0. Will 00085 /// throw NoContext, if no transport has been selected yet. 00086 TAO_IIOP_Connection_Handler* handler (void); 00087 00088 private: 00089 00090 /// Prevent copying through the copy constructor and 00091 /// assignment operator. 00092 //@{ 00093 IIOP_Current_Impl (const IIOP_Current_Impl &); 00094 void operator= (const IIOP_Current_Impl &); 00095 //@} 00096 00097 }; 00098 } 00099 00100 } 00101 00102 TAO_END_VERSIONED_NAMESPACE_DECL 00103 00104 #endif /* TAO_HAS_TRANSPORT_CURRENT == 1 */ 00105 00106 #include /**/ "ace/post.h" 00107 00108 #endif /* IIOP_CURRENT_IMPL_H */