COIOP_Transport.cpp

Go to the documentation of this file.
00001 // $Id: COIOP_Transport.cpp 79151 2007-08-01 09:04:36Z johnnyw $
00002 
00003 #include "tao/Strategies/COIOP_Transport.h"
00004 
00005 #if defined (TAO_HAS_COIOP) && (TAO_HAS_COIOP != 0)
00006 
00007 #include "tao/Strategies/COIOP_Connection_Handler.h"
00008 #include "tao/Strategies/COIOP_Acceptor.h"
00009 #include "tao/Strategies/COIOP_Profile.h"
00010 #include "tao/Acceptor_Registry.h"
00011 #include "tao/operation_details.h"
00012 #include "tao/Timeprobe.h"
00013 #include "tao/CDR.h"
00014 #include "tao/Transport_Mux_Strategy.h"
00015 #include "tao/Wait_Strategy.h"
00016 #include "tao/Stub.h"
00017 #include "tao/ORB_Core.h"
00018 #include "tao/debug.h"
00019 #include "tao/Resume_Handle.h"
00020 #include "tao/GIOP_Message_Base.h"
00021 
00022 ACE_RCSID (tao, COIOP_Transport, "$Id: COIOP_Transport.cpp 79151 2007-08-01 09:04:36Z johnnyw $")
00023 
00024 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00025 
00026 TAO_COIOP_Transport::TAO_COIOP_Transport (TAO_COIOP_Connection_Handler *handler,
00027                                           TAO_ORB_Core *orb_core)
00028   : TAO_Transport (TAO_TAG_COIOP_PROFILE,
00029                    orb_core)
00030   , connection_handler_ (handler)
00031   , messaging_object_ (0)
00032 {
00033 /*
00034  * Hook to customize the messaging object when the concrete messaging
00035  * object is known a priori. In this case, the flag is ignored.
00036  */
00037 //@@ MESSAGING_SPL_COMMENT_HOOK_START
00038 
00039   ACE_NEW (this->messaging_object_,
00040            TAO_GIOP_Message_Base (orb_core,
00041                                   this));
00042 //@@ MESSAGING_SPL_COMMENT_HOOK_END
00043 
00044 }
00045 
00046 TAO_COIOP_Transport::~TAO_COIOP_Transport (void)
00047 {
00048   delete this->messaging_object_;
00049 }
00050 
00051 ACE_Event_Handler *
00052 TAO_COIOP_Transport::event_handler_i (void)
00053 {
00054   return this->connection_handler_;
00055 }
00056 
00057 TAO_Connection_Handler *
00058 TAO_COIOP_Transport::connection_handler_i (void)
00059 {
00060   return this->connection_handler_;
00061 }
00062 
00063 TAO_Pluggable_Messaging *
00064 TAO_COIOP_Transport::messaging_object (void)
00065 {
00066   return this->messaging_object_;
00067 }
00068 
00069 ssize_t
00070 TAO_COIOP_Transport::send (iovec *,
00071                           int ,
00072                           size_t &bytes_transferred,
00073                           const ACE_Time_Value *)
00074 {
00075   // We don't send data over the wire with COIOP
00076   bytes_transferred = 0;
00077 
00078   return 1;
00079 }
00080 
00081 ssize_t
00082 TAO_COIOP_Transport::recv (char *, size_t , const ACE_Time_Value *)
00083 {
00084   return 0;
00085 }
00086 
00087 int
00088 TAO_COIOP_Transport::handle_input (TAO_Resume_Handle &,
00089                                   ACE_Time_Value *)
00090 {
00091   return 0;
00092 }
00093 
00094 
00095 int
00096 TAO_COIOP_Transport::register_handler (void)
00097 {
00098   // We do never register register the handler with the reactor
00099   // as we never need to be informed about any incoming data,
00100   // assuming we only use one-ways.
00101   // If we would register and ICMP Messages would arrive, e.g
00102   // due to a not reachable server, we would get informed - as this
00103   // disturbs the general COIOP assumptions of not being
00104   // interested in any network failures, we ignore ICMP messages.
00105   return 0;
00106 }
00107 
00108 
00109 int
00110 TAO_COIOP_Transport::send_request (TAO_Stub *,
00111                                   TAO_ORB_Core *,
00112                                   TAO_OutputCDR &,
00113                                   int,
00114                                   ACE_Time_Value *)
00115 {
00116   return 0;
00117 }
00118 
00119 int
00120 TAO_COIOP_Transport::send_message (TAO_OutputCDR &,
00121                                   TAO_Stub *,
00122                                   int,
00123                                   ACE_Time_Value *)
00124 {
00125   return 1;
00126 }
00127 
00128 int
00129 TAO_COIOP_Transport::send_message_shared (TAO_Stub *,
00130                                          int,
00131                                          const ACE_Message_Block *,
00132                                          ACE_Time_Value *)
00133 {
00134   return 1;
00135 }
00136 
00137 int
00138 TAO_COIOP_Transport::messaging_init (CORBA::Octet major,
00139                                     CORBA::Octet minor)
00140 {
00141   this->messaging_object_->init (major, minor);
00142   return 1;
00143 }
00144 
00145 TAO_END_VERSIONED_NAMESPACE_DECL
00146 
00147 #endif /* TAO_HAS_COIOP && TAO_HAS_COIOP != 0 */

Generated on Sun Jan 27 15:59:45 2008 for TAO_Strategies by doxygen 1.3.6