summaryrefslogtreecommitdiff
path: root/TAO/tao/IIOP_Transport.h
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tao/IIOP_Transport.h')
-rw-r--r--TAO/tao/IIOP_Transport.h70
1 files changed, 47 insertions, 23 deletions
diff --git a/TAO/tao/IIOP_Transport.h b/TAO/tao/IIOP_Transport.h
index 02a3b434904..9049dbff429 100644
--- a/TAO/tao/IIOP_Transport.h
+++ b/TAO/tao/IIOP_Transport.h
@@ -23,23 +23,28 @@
#include "tao/Pluggable.h"
-#include "tao/operation_details.h"
-#include "tao/GIOP_Message_State.h"
-#include "tao/Pluggable_Messaging_Utils.h"
-
-
-
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
+#include "tao/operation_details.h"
+#include "tao/GIOP_Message_State.h"
+#include "tao/Pluggable_Messaging_Utils.h"
+#include "ace/SOCK_Stream.h"
+#include "ace/Synch.h"
+#include "ace/Svc_Handler.h"
+
+
// Forward decls.
-class TAO_IIOP_Handler_Base;
class TAO_IIOP_Client_Connection_Handler;
class TAO_IIOP_Server_Connection_Handler;
class TAO_ORB_Core;
+// Service Handler for this transport
+typedef ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH>
+ TAO_IIOP_SVC_HANDLER;
+
class TAO_Export TAO_IIOP_Transport : public TAO_Transport
{
// = TITLE
@@ -51,29 +56,27 @@ class TAO_Export TAO_IIOP_Transport : public TAO_Transport
// protocol. This class in turn will be further specialized for
// the client and server side.
public:
- TAO_IIOP_Transport (TAO_IIOP_Handler_Base *handler,
- TAO_ORB_Core *orb_core);
+ TAO_IIOP_Transport (TAO_ORB_Core *orb_core);
// Base object's creator method.
~TAO_IIOP_Transport (void);
// Default destructor.
- TAO_IIOP_Handler_Base *&handler (void);
- // Return a reference to the corresponding connection handler.
-
// = The TAO_Transport methods, please check the documentation in
// "tao/Pluggable.h" for more details.
virtual void close_connection (void);
- virtual int idle (void);
+
virtual ACE_HANDLE handle (void);
+
virtual ACE_Event_Handler *event_handler (void);
+
virtual ssize_t send (TAO_Stub *stub,
int two_way,
const ACE_Message_Block *mblk,
const ACE_Time_Value *s = 0);
virtual ssize_t send (const ACE_Message_Block *mblk,
const ACE_Time_Value *s = 0,
- size_t *bytes_transferred = 0);
+ size_t *bytes_transferred = 0);
virtual ssize_t send (const u_char *buf,
size_t len,
const ACE_Time_Value *s = 0);
@@ -88,14 +91,15 @@ public:
virtual CORBA::Boolean
send_request_header (TAO_Operation_Details &opdetails,
- TAO_Target_Specification &spec,
- TAO_OutputCDR &msg);
-protected:
- TAO_IIOP_Handler_Base *handler_;
- // the connection service handler used for accessing lower layer
- // communication protocols.
+ TAO_Target_Specification &spec,
+ TAO_OutputCDR &msg);
+
+ virtual TAO_IIOP_SVC_HANDLER *service_handler (void) = 0;
+ // Return the connection service handler
};
+
+
class TAO_Export TAO_IIOP_Client_Transport : public TAO_IIOP_Transport
{
// = TITLE
@@ -109,15 +113,15 @@ class TAO_Export TAO_IIOP_Client_Transport : public TAO_IIOP_Transport
public:
TAO_IIOP_Client_Transport (TAO_IIOP_Client_Connection_Handler *handler,
TAO_ORB_Core *orb_core);
- // Constructor. Note, TAO_IIOP_Handler_Base is the base class for
- // both TAO_IIOP_Client_Connection_Handler and
- // TAO_IIOP_Server_Connection_Handler.
+ // Constructor.
~TAO_IIOP_Client_Transport (void);
// destructor
// = The TAO_Transport methods, please check the documentation in
// "tao/Pluggable.h" for more details.
+ virtual int idle (void);
+
virtual void start_request (TAO_ORB_Core *orb_core,
TAO_Target_Specification &spec,
TAO_OutputCDR &output,
@@ -139,6 +143,7 @@ public:
virtual int handle_client_input (int block = 0,
ACE_Time_Value *max_time_value = 0);
+
virtual int register_handler (void);
virtual CORBA::Boolean
@@ -146,13 +151,21 @@ public:
TAO_Target_Specification &spec,
TAO_OutputCDR &msg);
+ virtual TAO_IIOP_SVC_HANDLER *service_handler (void);
+
int messaging_init (CORBA::Octet major,
CORBA::Octet minor);
// Initialising the messaging object
void use_lite (CORBA::Boolean flag);
// Sets the lite flag
+
private:
+
+ TAO_IIOP_Client_Connection_Handler *handler_;
+ // The connection service handler used for accessing lower layer
+ // communication protocols.
+
TAO_Pluggable_Messaging *client_mesg_factory_;
// The message_factor instance specific for this particular
// transport protocol.
@@ -188,10 +201,21 @@ public:
~TAO_IIOP_Server_Transport (void);
// Default destructor
+ // Please see Pluggable.h for documentation
+ virtual int idle (void);
+
+ virtual TAO_IIOP_SVC_HANDLER *service_handler (void);
+
TAO_GIOP_Message_State message_state_;
// This keep the state of the current message, to enable
// non-blocking reads, fragment reassembly, etc.
// @@Bala. Should not be here like this
+
+private:
+
+ TAO_IIOP_Server_Connection_Handler *handler_;
+ // The connection service handler used for accessing lower layer
+ // communication protocols.
};
#if defined (__ACE_INLINE__)