Transport.inl

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 // $Id: Transport.inl 79691 2007-09-21 09:45:34Z johnnyw $
00004 
00005 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00006 
00007 ACE_INLINE CORBA::ULong
00008 TAO_Transport::tag (void) const
00009 {
00010   return this->tag_;
00011 }
00012 
00013 ACE_INLINE TAO_ORB_Core *
00014 TAO_Transport::orb_core (void) const
00015 {
00016   return this->orb_core_;
00017 }
00018 
00019 ACE_INLINE TAO_Transport_Mux_Strategy *
00020 TAO_Transport::tms (void) const
00021 {
00022   return tms_;
00023 }
00024 
00025 // Return the Wait strategy used by the Transport.
00026 ACE_INLINE TAO_Wait_Strategy *
00027 TAO_Transport::wait_strategy (void) const
00028 {
00029   return this->ws_;
00030 }
00031 
00032 ACE_INLINE int
00033 TAO_Transport::bidirectional_flag (void) const
00034 {
00035   return this->bidirectional_flag_;
00036 }
00037 
00038 ACE_INLINE void
00039 TAO_Transport::bidirectional_flag (int flag)
00040 {
00041   this->bidirectional_flag_ = flag;
00042 }
00043 
00044 ACE_INLINE TAO::Connection_Role
00045 TAO_Transport::opened_as () const
00046 {
00047   return this->opening_connection_role_;
00048 }
00049 
00050 ACE_INLINE void
00051 TAO_Transport::opened_as (TAO::Connection_Role role)
00052 {
00053   this->opening_connection_role_ = role;
00054 }
00055 
00056 ACE_INLINE TAO::Transport_Cache_Manager::HASH_MAP_ENTRY *
00057 TAO_Transport::cache_map_entry (void)
00058 {
00059   return this->cache_map_entry_;
00060 }
00061 
00062 ACE_INLINE void
00063 TAO_Transport::cache_map_entry (
00064     TAO::Transport_Cache_Manager::HASH_MAP_ENTRY *entry)
00065 {
00066   this->cache_map_entry_ = entry;
00067 }
00068 
00069 ACE_INLINE unsigned long
00070 TAO_Transport::purging_order (void) const
00071 {
00072   return this->purging_order_;
00073 }
00074 
00075 ACE_INLINE void
00076 TAO_Transport::purging_order (unsigned long value)
00077 {
00078   // This should only be called by the Transport Cache Manager when
00079   // it is holding it's lock.
00080   // The transport should still be here since the cache manager still
00081   // has a reference to it.
00082   this->purging_order_ = value;
00083 }
00084 
00085 ACE_INLINE size_t
00086 TAO_Transport::id (void) const
00087 {
00088   return this->id_;
00089 }
00090 
00091 ACE_INLINE void
00092 TAO_Transport::id (size_t id)
00093 {
00094   this->id_ = id;
00095 }
00096 
00097 ACE_INLINE bool
00098 TAO_Transport::queue_is_empty (void)
00099 {
00100   ACE_GUARD_RETURN (ACE_Lock,
00101                     ace_mon,
00102                     *this->handler_lock_,
00103                     false);
00104   return this->queue_is_empty_i ();
00105 }
00106 
00107 ACE_INLINE int
00108 TAO_Transport::flush_timer_pending (void) const
00109 {
00110   return this->flush_timer_id_ != -1;
00111 }
00112 
00113 ACE_INLINE void
00114 TAO_Transport::reset_flush_timer (void)
00115 {
00116   this->flush_timer_id_ = -1;
00117   this->current_deadline_ = ACE_Time_Value::zero;
00118 }
00119 
00120 ACE_INLINE TAO_GIOP_Message_Base *
00121 TAO_Transport::messaging_object (void)
00122 {
00123   return this->messaging_object_;
00124 }
00125 
00126 //********************************************************************
00127 // codeset related methods
00128 
00129 
00130 ACE_INLINE TAO_Codeset_Translator_Base *
00131 TAO_Transport::char_translator (void) const
00132 {
00133   return this->char_translator_;
00134 }
00135 
00136 ACE_INLINE TAO_Codeset_Translator_Base *
00137 TAO_Transport::wchar_translator (void) const
00138 {
00139   return this->wchar_translator_;
00140 }
00141 
00142 ACE_INLINE void
00143 TAO_Transport::char_translator (TAO_Codeset_Translator_Base *tf)
00144 {
00145   this->char_translator_ = tf;
00146   this->tcs_set_ = 1;
00147 }
00148 
00149 ACE_INLINE void
00150 TAO_Transport::wchar_translator (TAO_Codeset_Translator_Base *tf)
00151 {
00152   this->wchar_translator_ = tf;
00153   this->tcs_set_ = 1;
00154 }
00155 
00156 /// CodeSet negotiation
00157 ACE_INLINE CORBA::Boolean
00158 TAO_Transport::is_tcs_set(void) const
00159 {
00160   return tcs_set_;
00161 }
00162 
00163 ACE_INLINE void
00164 TAO_Transport::first_request_sent (void)
00165 {
00166   this->first_request_ = 0;
00167 }
00168 
00169 ACE_INLINE bool
00170 TAO_Transport::is_connected (void) const
00171 {
00172   ACE_GUARD_RETURN (ACE_Lock,
00173                     ace_mon,
00174                     *this->handler_lock_,
00175                     false);
00176 
00177   return this->is_connected_;
00178 }
00179 
00180 ACE_INLINE TAO_Connection_Handler *
00181 TAO_Transport::connection_handler (void)
00182 {
00183   return this->connection_handler_i();
00184 }
00185 
00186 ACE_INLINE size_t
00187 TAO_Transport::recv_buffer_size (void) const
00188 {
00189   return this->recv_buffer_size_;
00190 }
00191 
00192 ACE_INLINE size_t
00193 TAO_Transport::sent_byte_count (void) const
00194 {
00195   return this->sent_byte_count_;
00196 }
00197 
00198 #if TAO_HAS_TRANSPORT_CURRENT == 1
00199 
00200 ACE_INLINE TAO::Transport::Stats*
00201 TAO_Transport::stats (void) const
00202 {
00203   return this->stats_;
00204 }
00205 
00206 ACE_INLINE
00207 TAO::Transport::Stats::Stats ()
00208   : messages_rcvd_ (0)
00209   , messages_sent_ (0)
00210   , bytes_rcvd_()
00211   , bytes_sent_ ()
00212   , opened_since_ ()
00213 {
00214 }
00215 
00216 ACE_INLINE void
00217 TAO::Transport::Stats::messages_sent (size_t message_length)
00218 {
00219   this->messages_sent_++;
00220   this->bytes_sent_.sample (message_length);
00221 }
00222 
00223 ACE_INLINE CORBA::LongLong
00224 TAO::Transport::Stats::messages_sent (void) const
00225 {
00226   return this->messages_sent_;
00227 }
00228 
00229 ACE_INLINE CORBA::LongLong
00230 TAO::Transport::Stats::bytes_sent (void) const
00231 {
00232   return this->bytes_sent_.sum_;
00233 }
00234 
00235 ACE_INLINE void
00236 TAO::Transport::Stats::messages_received (size_t message_length)
00237 {
00238   this->messages_rcvd_++;
00239   this->bytes_rcvd_.sample (message_length);
00240 }
00241 
00242 ACE_INLINE CORBA::LongLong
00243 TAO::Transport::Stats::messages_received (void) const
00244 {
00245   return this->messages_rcvd_;
00246 }
00247 
00248 ACE_INLINE CORBA::LongLong
00249 TAO::Transport::Stats::bytes_received (void) const
00250 {
00251   return this->bytes_rcvd_.sum_;
00252 }
00253 
00254 ACE_INLINE void
00255 TAO::Transport::Stats::opened_since (const ACE_Time_Value& tv)
00256 {
00257   this->opened_since_ = tv;
00258 }
00259 
00260 ACE_INLINE const ACE_Time_Value&
00261 TAO::Transport::Stats::opened_since (void) const
00262 {
00263   return this->opened_since_;
00264 }
00265 #endif /* TAO_HAS_TRANSPORT_CURRENT == 1 */
00266 
00267 
00268 TAO_END_VERSIONED_NAMESPACE_DECL

Generated on Tue Feb 2 17:37:53 2010 for TAO by  doxygen 1.4.7