SSLIOP_Transport.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file   SSLIOP_Transport.h
00006  *
00007  *  SSLIOP_Transport.h,v 1.36 2006/03/14 06:14:35 jtc Exp
00008  *
00009  *  SSLIOP Transport specific processing.
00010  *
00011  *  @author Carlos O'Ryan <coryan@ece.uci.edu>
00012  *  @author Ossama Othman <ossama@dre.vanderbilt.edu>
00013  */
00014 //=============================================================================
00015 
00016 
00017 #ifndef TAO_SSLIOP_TRANSPORT_H
00018 #define TAO_SSLIOP_TRANSPORT_H
00019 
00020 #include /**/ "ace/pre.h"
00021 
00022 #include "orbsvcs/SSLIOP/SSLIOP_Export.h"
00023 
00024 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00025 # pragma once
00026 #endif /* ACE_LACKS_PRAGMA_ONCE */
00027 
00028 #include "tao/Transport.h"
00029 #include "tao/operation_details.h"
00030 #include "tao/GIOP_Message_Version.h"
00031 #include "tao/Pluggable_Messaging_Utils.h"
00032 #include "tao/IIOPC.h"
00033 
00034 #include "ace/SSL/SSL_SOCK_Stream.h"
00035 
00036 #include "ace/Svc_Handler.h"
00037 
00038 
00039 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00040 
00041 // Forward decls.
00042 class TAO_ORB_Core;
00043 class TAO_Pluggable_Messaging;
00044 class TAO_Acceptor;
00045 
00046 namespace TAO
00047 {
00048   namespace SSLIOP
00049   {
00050     typedef ACE_Svc_Handler<ACE_SSL_SOCK_STREAM, ACE_NULL_SYNCH> SVC_HANDLER;
00051 
00052     class Handler_Base;
00053     class Connection_Handler;
00054 
00055     /**
00056      * @class Transport
00057      *
00058      * @brief SSLIOP-specific transport implementation.
00059      *
00060      * SSLIOP-specific transport implementation.
00061      */
00062     class TAO_SSLIOP_Export Transport : public TAO_Transport
00063     {
00064     public:
00065 
00066       /// Constructor.
00067       Transport (Connection_Handler *handler,
00068                  TAO_ORB_Core *orb_core,
00069                  CORBA::Boolean flag);
00070 
00071       /// Default destructor.
00072       ~Transport (void);
00073 
00074       /// Overload of the handle_input () in the TAO_Transport
00075       /// class. This is required to set up the state guard. The
00076       /// thread-per-connection and wait on RW strategies call this
00077       /// handle_input ().
00078       virtual int handle_input (TAO_Resume_Handle &rh,
00079                                 ACE_Time_Value *max_wait_time = 0,
00080                                 int block = 0);
00081 
00082     protected:
00083       /** @name Overridden Template Methods
00084        *
00085        * These are implementations of template methods declared by
00086        * TAO_Transport.
00087        */
00088       //@{
00089       virtual ACE_Event_Handler * event_handler_i (void);
00090       virtual TAO_Connection_Handler *connection_handler_i (void);
00091 
00092       virtual TAO_Pluggable_Messaging *messaging_object (void);
00093 
00094       /// Write the complete Message_Block chain to the connection.
00095       virtual ssize_t send (iovec *iov, int iovcnt,
00096                             size_t &bytes_transferred,
00097                             const ACE_Time_Value *timeout = 0);
00098 
00099       /// Read len bytes from into buf.
00100       virtual ssize_t recv (char *buf,
00101                             size_t len,
00102                             const ACE_Time_Value *s = 0);
00103 
00104     public:
00105       /// @todo These methods IMHO should have more meaningful
00106       ///       names. The names seem to indicate nothing.
00107       virtual int send_request (TAO_Stub *stub,
00108                                 TAO_ORB_Core *orb_core,
00109                                 TAO_OutputCDR &stream,
00110                                 int message_semantics,
00111                                 ACE_Time_Value *max_wait_time);
00112 
00113       virtual int send_message (TAO_OutputCDR &stream,
00114                                 TAO_Stub *stub = 0,
00115                                 int message_semantics =
00116                                   TAO_Transport::TAO_TWOWAY_REQUEST,
00117                                 ACE_Time_Value *max_time_wait = 0);
00118 
00119       virtual int generate_request_header (TAO_Operation_Details &opdetails,
00120                                            TAO_Target_Specification &spec,
00121                                            TAO_OutputCDR &msg);
00122 
00123       /// Initialising the messaging object
00124       virtual int messaging_init (CORBA::Octet major,
00125                                   CORBA::Octet minor);
00126 
00127       /// Open teh service context list and process it.
00128       virtual int tear_listen_point_list (TAO_InputCDR &cdr);
00129       //@}
00130 
00131     private:
00132 
00133       /// Set the Bidirectional context info in the service context
00134       /// list.
00135       void set_bidir_context_info (TAO_Operation_Details &opdetails);
00136 
00137       /// Add the listen points in @a acceptor to the @a
00138       /// listen_point_list if this connection is in the same
00139       /// interface as that of the endpoints in the @a acceptor.
00140       int get_listen_point (IIOP::ListenPointList &listen_point_list,
00141                             TAO_Acceptor *acceptor);
00142 
00143     private:
00144 
00145       /// The connection service handler used for accessing lower layer
00146       /// communication protocols.
00147       Connection_Handler *connection_handler_;
00148 
00149       /// Our messaging object.
00150       TAO_Pluggable_Messaging *messaging_object_;
00151     };
00152 
00153   }  // End SSLIOP namespace.
00154 }  // End TAO namespace.
00155 
00156 TAO_END_VERSIONED_NAMESPACE_DECL
00157 
00158 #include /**/ "ace/post.h"
00159 #endif  /* TAO_SSLIOP_TRANSPORT_H */

Generated on Thu Nov 9 13:54:15 2006 for TAO_SSLIOP by doxygen 1.3.6