00001 // -*- C++ -*- 00002 // 00003 //$Id: Connection_Handler.inl 75197 2006-11-03 12:36:13Z elliott_c $ 00004 00005 #include "tao/Transport.h" 00006 00007 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00008 00009 ACE_INLINE TAO_ORB_Core * 00010 TAO_Connection_Handler::orb_core (void) 00011 { 00012 return this->orb_core_; 00013 } 00014 00015 ACE_INLINE TAO_Transport * 00016 TAO_Connection_Handler::transport (void) 00017 { 00018 return this->transport_; 00019 } 00020 00021 ACE_INLINE bool 00022 TAO_Connection_Handler::is_closed (void) const 00023 { 00024 return (this->state_ == TAO_LF_Event::LFS_CONNECTION_CLOSED || 00025 this->state_ == TAO_LF_Event::LFS_TIMEOUT); 00026 } 00027 00028 ACE_INLINE bool 00029 TAO_Connection_Handler::is_timeout (void) const 00030 { 00031 return (this->state_ == TAO_LF_Event::LFS_TIMEOUT); 00032 } 00033 00034 ACE_INLINE bool 00035 TAO_Connection_Handler::is_open (void) const 00036 { 00037 return this->state_ == TAO_LF_Event::LFS_SUCCESS; 00038 } 00039 00040 ACE_INLINE bool 00041 TAO_Connection_Handler::is_connecting (void) const 00042 { 00043 return this->state_ == TAO_LF_Event::LFS_CONNECTION_WAIT; 00044 } 00045 00046 00047 ACE_INLINE void 00048 TAO_Connection_Handler::connection_pending (void) 00049 { 00050 if (!this->connection_pending_) 00051 { 00052 this->connection_pending_ = true; 00053 this->transport()->add_reference(); 00054 } 00055 } 00056 00057 ACE_INLINE void 00058 TAO_Connection_Handler::cancel_pending_connection (void) 00059 { 00060 if (this->connection_pending_) 00061 { 00062 this->connection_pending_ = false; 00063 this->transport()->remove_reference(); 00064 } 00065 } 00066 00067 //@@ CONNECTION_HANDLER_SPL_METHODS_ADD_HOOK 00068 00069 TAO_END_VERSIONED_NAMESPACE_DECL