summaryrefslogtreecommitdiff
path: root/TAO/tao/SHMIOP_Transport.h
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tao/SHMIOP_Transport.h')
-rw-r--r--TAO/tao/SHMIOP_Transport.h48
1 files changed, 33 insertions, 15 deletions
diff --git a/TAO/tao/SHMIOP_Transport.h b/TAO/tao/SHMIOP_Transport.h
index 47a480f09aa..1d7991fdecd 100644
--- a/TAO/tao/SHMIOP_Transport.h
+++ b/TAO/tao/SHMIOP_Transport.h
@@ -31,13 +31,18 @@
#include "tao/Pluggable.h"
#include "tao/GIOP_Message_State.h"
+#include "ace/MEM_Acceptor.h"
+#include "ace/Synch.h"
+#include "ace/Svc_Handler.h"
// Forward decls.
-class TAO_SHMIOP_Handler_Base;
class TAO_SHMIOP_Client_Connection_Handler;
class TAO_SHMIOP_Server_Connection_Handler;
class TAO_ORB_Core;
+typedef ACE_Svc_Handler<ACE_MEM_STREAM, ACE_NULL_SYNCH>
+ TAO_SHMIOP_SVC_HANDLER;
+
class TAO_Export TAO_SHMIOP_Transport : public TAO_Transport
{
// = TITLE
@@ -49,20 +54,16 @@ class TAO_Export TAO_SHMIOP_Transport : public TAO_Transport
// protocol. This class in turn will be further specialized for
// the client and server side.
public:
- TAO_SHMIOP_Transport (TAO_SHMIOP_Handler_Base *handler,
- TAO_ORB_Core *orb_core);
+ TAO_SHMIOP_Transport (TAO_ORB_Core *orb_core);
// Base object's creator method.
~TAO_SHMIOP_Transport (void);
// Default destructor.
- TAO_SHMIOP_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,
@@ -71,7 +72,7 @@ public:
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,10 +89,8 @@ public:
TAO_Target_Specification &spec,
TAO_OutputCDR &msg);
-protected:
- TAO_SHMIOP_Handler_Base *handler_;
- // the connection service handler used for accessing lower layer
- // communication protocols.
+ virtual TAO_SHMIOP_SVC_HANDLER *service_handler (void) = 0;
+ // Return the underlying the service handler
};
class TAO_Export TAO_SHMIOP_Client_Transport : public TAO_SHMIOP_Transport
@@ -107,15 +106,15 @@ class TAO_Export TAO_SHMIOP_Client_Transport : public TAO_SHMIOP_Transport
public:
TAO_SHMIOP_Client_Transport (TAO_SHMIOP_Client_Connection_Handler *handler,
TAO_ORB_Core *orb_core);
- // Constructor. Note, TAO_SHMIOP_Handler_Base is the base class for
- // both TAO_SHMIOP_Client_Connection_Handler and
- // TAO_SHMIOP_Server_Connection_Handler.
+ // Constructor.
~TAO_SHMIOP_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,
@@ -135,6 +134,7 @@ public:
ACE_Time_Value *max_wait_time);
virtual int handle_client_input (int block = 0,
ACE_Time_Value *max_time_value = 0);
+
virtual int register_handler (void);
virtual CORBA::Boolean
@@ -142,6 +142,8 @@ public:
TAO_Target_Specification &spec,
TAO_OutputCDR &msg);
+ virtual TAO_SHMIOP_SVC_HANDLER *service_handler (void);
+
int messaging_init (CORBA::Octet major,
CORBA::Octet minor);
// Initialising the messaging object
@@ -150,6 +152,11 @@ public:
// Sets the lite flag
private:
+
+ TAO_SHMIOP_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,6 +195,17 @@ public:
TAO_GIOP_Message_State message_state_;
// This keep the state of the current message, to enable
// non-blocking reads, fragment reassembly, etc.
+
+ // Please see Pluggable.h for documentation
+ virtual int idle (void);
+
+ virtual TAO_SHMIOP_SVC_HANDLER *service_handler (void);
+
+private:
+
+ TAO_SHMIOP_Server_Connection_Handler *handler_;
+ // the connection service handler used for accessing lower layer
+ // communication protocols.
};
#if defined (__ACE_INLINE__)