TAO_Server_Request.inl

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 // $Id: TAO_Server_Request.inl 81140 2008-03-28 09:19:19Z vzykov $
00004 
00005 #include "tao/GIOP_Utils.h"
00006 
00007 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00008 
00009 // This constructor is used by the CSD clone.
00010 ACE_INLINE
00011 TAO_ServerRequest::TAO_ServerRequest (void)
00012   : mesg_base_ (0),
00013     operation_ (0),
00014     operation_len_ (0),
00015     release_operation_ (false),
00016     incoming_ (0),
00017     outgoing_ (0),
00018     response_expected_ (false),
00019     deferred_reply_ (false),
00020     sync_with_server_ (false),
00021     is_dsi_ (false),
00022     reply_status_ (GIOP::NO_EXCEPTION),
00023     orb_core_ (0),
00024     request_id_ (0),
00025     profile_ (0),
00026     requesting_principal_ (0),
00027     dsi_nvlist_align_ (0),
00028     operation_details_ (0),
00029     argument_flag_ (true)
00030 #if TAO_HAS_INTERCEPTORS == 1
00031   , interceptor_count_ (0)
00032   , rs_pi_current_ ()
00033   , caught_exception_ (0)
00034   , pi_reply_status_ (-1)
00035 #endif  /* TAO_HAS_INTERCEPTORS == 1 */
00036   ,  transport_(0)
00037 {
00038 }
00039 
00040 ACE_INLINE TAO_ORB_Core *
00041 TAO_ServerRequest::orb_core (void) const
00042 {
00043   return this->orb_core_;
00044 }
00045 
00046 ACE_INLINE TAO_InputCDR *
00047 TAO_ServerRequest::incoming (void) const
00048 {
00049   return this->incoming_;
00050 }
00051 
00052 ACE_INLINE TAO_OutputCDR *
00053 TAO_ServerRequest::outgoing (void) const
00054 {
00055   return this->outgoing_;
00056 }
00057 
00058 ACE_INLINE const char *
00059 TAO_ServerRequest::operation (void) const
00060 {
00061   return (this->operation_ == 0 ? "" : this->operation_);
00062 }
00063 
00064 ACE_INLINE void
00065 TAO_ServerRequest::operation (const char *operation,
00066                               size_t length,
00067                               int release)
00068 {
00069   if (this->release_operation_)
00070     CORBA::string_free (const_cast <char*> (this->operation_));
00071 
00072   this->operation_len_ = (length == 0 ? ACE_OS::strlen (operation) : length);
00073   this->release_operation_ = release;
00074   this->operation_ = operation;
00075 }
00076 
00077 ACE_INLINE size_t
00078 TAO_ServerRequest::operation_length (void) const
00079 {
00080   return this->operation_len_;
00081 }
00082 
00083 ACE_INLINE CORBA::Boolean
00084 TAO_ServerRequest::response_expected (void) const
00085 {
00086   return this->response_expected_;
00087 }
00088 
00089 ACE_INLINE CORBA::Boolean
00090 TAO_ServerRequest::deferred_reply (void) const
00091 {
00092   return this->deferred_reply_;
00093 }
00094 
00095 ACE_INLINE void
00096 TAO_ServerRequest::response_expected (CORBA::Boolean response)
00097 {
00098   this->response_expected_ = response;
00099 }
00100 
00101 ACE_INLINE CORBA::Boolean
00102 TAO_ServerRequest::sync_with_server (void) const
00103 {
00104   return this->sync_with_server_;
00105 }
00106 
00107 ACE_INLINE void
00108 TAO_ServerRequest::sync_with_server (CORBA::Boolean sync_flag)
00109 {
00110   this->sync_with_server_ = sync_flag;
00111 }
00112 
00113 ACE_INLINE TAO::ObjectKey &
00114 TAO_ServerRequest::object_key (void)
00115 {
00116   return this->profile_.object_key ();
00117 }
00118 
00119 ACE_INLINE TAO_Service_Context &
00120 TAO_ServerRequest::request_service_context (void)
00121 {
00122   return this->request_service_context_;
00123 }
00124 
00125 ACE_INLINE IOP::ServiceContextList &
00126 TAO_ServerRequest::reply_service_info (void)
00127 {
00128   return this->reply_service_context ().service_info ();
00129 }
00130 
00131 ACE_INLINE IOP::ServiceContextList &
00132 TAO_ServerRequest::request_service_info (void)
00133 {
00134   return this->request_service_context ().service_info ();
00135 }
00136 
00137 ACE_INLINE TAO_Transport *
00138 TAO_ServerRequest::transport (void)
00139 {
00140   return this->transport_.get ();
00141 }
00142 
00143 ACE_INLINE CORBA::ULong
00144 TAO_ServerRequest::request_id (void)
00145 {
00146   return this->request_id_;
00147 }
00148 
00149 ACE_INLINE void
00150 TAO_ServerRequest::request_id (CORBA::ULong req)
00151 {
00152   this->request_id_ = req;
00153 }
00154 
00155 ACE_INLINE void
00156 TAO_ServerRequest::requesting_principal (const CORBA::OctetSeq &principal)
00157 {
00158   this->requesting_principal_ = principal;
00159 }
00160 
00161 ACE_INLINE TAO_Tagged_Profile &
00162 TAO_ServerRequest::profile (void)
00163 {
00164   return this->profile_;
00165 }
00166 
00167 ACE_INLINE void
00168 TAO_ServerRequest::forward_location (CORBA::Object_ptr forward_reference)
00169 {
00170   this->forward_location_ =
00171     CORBA::Object::_duplicate (forward_reference);
00172   this->is_forwarded_ = true;
00173 }
00174 
00175 ACE_INLINE CORBA::Object_ptr
00176 TAO_ServerRequest::forward_location (void)
00177 {
00178   return CORBA::Object::_duplicate (this->forward_location_.in ());
00179 }
00180 
00181 ACE_INLINE bool
00182 TAO_ServerRequest::is_forwarded (void) const
00183 {
00184   return this->is_forwarded_;
00185 }
00186 
00187 ACE_INLINE GIOP::ReplyStatusType
00188 TAO_ServerRequest::reply_status (void)
00189 {
00190   return this->reply_status_;
00191 }
00192 
00193 ACE_INLINE void
00194 TAO_ServerRequest::reply_status (GIOP::ReplyStatusType reply_status)
00195 {
00196   this->reply_status_ = reply_status;
00197 }
00198 
00199 ACE_INLINE void
00200 TAO_ServerRequest::is_dsi (void)
00201 {
00202   this->is_dsi_ = true;
00203 }
00204 
00205 ACE_INLINE TAO_Operation_Details const *
00206 TAO_ServerRequest::operation_details (void) const
00207 {
00208   return this->operation_details_;
00209 }
00210 
00211 ACE_INLINE void
00212 TAO_ServerRequest::dsi_nvlist_align (ptrdiff_t alignment)
00213 {
00214   this->dsi_nvlist_align_ = alignment;
00215 }
00216 
00217 ACE_INLINE CORBA::Boolean
00218 TAO_ServerRequest::argument_flag (void)
00219 {
00220   return this->argument_flag_;
00221 }
00222 
00223 ACE_INLINE void
00224 TAO_ServerRequest::argument_flag (CORBA::Boolean flag)
00225 {
00226   this->argument_flag_ = flag;
00227 }
00228 
00229 ACE_INLINE bool
00230 TAO_ServerRequest::collocated (void) const
00231 {
00232   return this->transport_.get () == 0;
00233 }
00234 
00235 
00236 #if TAO_HAS_INTERCEPTORS == 1
00237 ACE_INLINE size_t &
00238 TAO_ServerRequest::interceptor_count (void)
00239 {
00240   return this->interceptor_count_;
00241 }
00242 
00243 ACE_INLINE CORBA::Exception *
00244 TAO_ServerRequest::caught_exception (void)
00245 {
00246   return this->caught_exception_;
00247 }
00248 
00249 ACE_INLINE void
00250 TAO_ServerRequest::pi_reply_status (PortableInterceptor::ReplyStatus s)
00251 {
00252   this->pi_reply_status_ = s;
00253 }
00254 
00255 ACE_INLINE PortableInterceptor::ReplyStatus
00256 TAO_ServerRequest::pi_reply_status (void)
00257 {
00258   return this->pi_reply_status_;
00259 }
00260 
00261 #endif  /* TAO_HAS_INTERCEPTORS == 1 */
00262 
00263 TAO_END_VERSIONED_NAMESPACE_DECL

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