summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbala <balanatarajan@users.noreply.github.com>1999-12-16 21:03:37 +0000
committerbala <balanatarajan@users.noreply.github.com>1999-12-16 21:03:37 +0000
commit1b51d4f958a85aa79ad9fc3a308b2ff7bd9e5d2f (patch)
tree70c27e6d18d788271ec6156ca603dbd9f32be80d
parentec083559f3adbd5b4d606a2e8629a84297ac1d30 (diff)
downloadATCD-1b51d4f958a85aa79ad9fc3a308b2ff7bd9e5d2f.tar.gz
*** empty log message ***
-rw-r--r--TAO/tao/Pluggable_Messaging.cpp15
-rw-r--r--TAO/tao/Pluggable_Messaging.h113
2 files changed, 109 insertions, 19 deletions
diff --git a/TAO/tao/Pluggable_Messaging.cpp b/TAO/tao/Pluggable_Messaging.cpp
index 6910542b54c..8d3ef8f54b2 100644
--- a/TAO/tao/Pluggable_Messaging.cpp
+++ b/TAO/tao/Pluggable_Messaging.cpp
@@ -10,13 +10,24 @@
// Methods for the Pluugable Messaging stuff
/////////////////////////////////////////////////////////////////////////
-TAO_Pluggable_Message_Factory::TAO_Pluggable_Message_Factory (void)
+TAO_Pluggable_Client_Message_Factory::TAO_Pluggable_Client_Message_Factory (void)
{
//no-op
}
-TAO_Pluggable_Message_Factory::~TAO_Pluggable_Message_Factory (void)
+TAO_Pluggable_Client_Message_Factory::~TAO_Pluggable_Client_Message_Factory (void)
+{
+ //no-op
+}
+
+TAO_Pluggable_Server_Message_Factory::TAO_Pluggable_Server_Message_Factory (void)
+{
+ //no-op
+}
+
+
+TAO_Pluggable_Server_Message_Factory::~TAO_Pluggable_Server_Message_Factory (void)
{
//no-op
}
diff --git a/TAO/tao/Pluggable_Messaging.h b/TAO/tao/Pluggable_Messaging.h
index 6510c495d3e..a7bcf8e1aa7 100644
--- a/TAO/tao/Pluggable_Messaging.h
+++ b/TAO/tao/Pluggable_Messaging.h
@@ -21,25 +21,44 @@
#include "tao/corbafwd.h"
#include "tao/Pluggable.h"
-class TAO_Export TAO_Pluggable_Message_Factory
+class TAO_Message_State_Factory;
+
+typedef enum MessageType
+{
+ // = DESCRIPTION
+ // Provide an external interface for the users of this pluggable
+ // messaging framework to denote existing message types. This has
+ // an inspiration from GIOP. So if anybody wants to add more message
+ // types you are welcome but please do not change the numbering
+ // scheme as this would affect GIOP.
+
+ TAO_MESSAGE_REQUEST = 0, // sent by client.
+ TAO_MESSAGE_REPLY = 1, // by server.
+ TAO_MESSAGE_CANCELREQUEST = 2, // by client.
+ TAO_MESSAGE_LOCATEREQUEST = 3, // by client.
+ TAO_MESSAGE_LOCATEREPLY = 4,
+ TAO_MESSAGE_CLOSECONNECTION = 5,
+ TAO_MESSAGE_MESSAGERROR = 6, // by both.
+ TAO_MESSAGE_FRAGMENT = 7 // by both.
+}TAO_Pluggable_Message_Type;
+
+
+class TAO_Export TAO_Pluggable_Client_Message_Factory
{
// = TITLE
- // Generic definitions for the new Pluggable Messaging class.
+ // Generic definitions for the Client side of the Pluggable
+ // Messaging class.
//
// = DESCRIPTION
//
public:
-
- TAO_Pluggable_Message_Factory (void);
+ TAO_Pluggable_Client_Message_Factory (void);
// Ctor
- virtual ~TAO_Pluggable_Message_Factory (void);
+ virtual ~TAO_Pluggable_Client_Message_Factory (void);
// Dtor
- /**********************************************************/
- // Methods related to the messages that would be sent by the client
- /**********************************************************/
virtual CORBA::Boolean write_request_header (const IOP::ServiceContextList& svc_ctx,
CORBA::ULong request_id,
CORBA::Octet response_flags,
@@ -63,21 +82,81 @@ public:
TAO_Stub *stub = 0) = 0;
// Send message, returns TRUE if success, else FALSE.
+ virtual CORBA::Boolean start_message (TAO_Pluggable_Message_Type t,
+ TAO_OutputCDR &msg) = 0;
+ // Start writing the header for a message in to the stream <msg>
+};
+
+class TAO_Export TAO_Pluggable_Server_Message_Factory
+{
+ // = TITLE
+ // Generic definitions for the server side of the Pluggable
+ // Message .factory
+ //
+ // = DESCRIPTION
+ //
+
+public:
+
+ TAO_Pluggable_Server_Message_Factory (void);
+ // Ctor
+
+ virtual ~TAO_Pluggable_Server_Message_Factory (void);
+ // Dtor
+
+ // virtual int send_message (TAO_Transport *transport,
+ // TAO_OutputCDR &stream,
+ /// ACE_Time_Value *max_wait_time = 0,
+ //TAO_Stub *stub = 0) = 0;
+ // Send message, returns TRUE if success, else FALSE.
+
+ virtual int handle_input (TAO_Transport *transport,
+ TAO_ORB_Core *orb_core,
+ TAO_Message_State_Factory &state,
+ ACE_Time_Value *max_wait_time = 0) = 0;
+
+};
+
+
+class TAO_Export TAO_Message_State_Factory
+{
+ // = TITLE
+ // Generic definitions for Message States.
+ //
+ // = DESCRIPTION
+ // This would represnt the state of the incoming message states.
+ // As the ORB processes incoming messages it need to keep track of
+ // how much of the message has been read. if there are any
+ // fragments following this message etc. This class attempts to
+ // give a generic interface to all the messaging protocols message
+ // states so that the Transport layer does not really know with
+ // whom it is interacting with.
+public:
+ TAO_Message_State_Factory (void);
+ // Ctor
- /**********************************************************/
- // Methods related to the messages that would be sent by the server.
- /**********************************************************/
- //virtual CORBA::Boolean start_message (const TAO_GIOP_Version &version,
- // TAO_GIOP_Message_Factory::Message_Type t,
- // TAO_OutputCDR &msg);
- // Build the header for a message of type <t> into stream
- // <msg>. Other GIOP related protocols that do not use this can
- // override this. Like GIOP_lite
+ virtual ~TAO_Message_State_Factory (void);
+ // Dtor
+
+ virtual void reset (int reset_contents = 1) = 0;
+ // Reset the message header state and prepare it to receive the next
+ // event.
+
+ virtual CORBA::Boolean header_received (void) const = 0;
+ // Has the header been received?
+ virtual int is_complete (void) = 0;
+ // Check if the current message is complete, adjusting the fragments
+ // if required...
+
+
+private:
+
};
+
#if defined (__ACE_INLINE__)
# include "tao/Pluggable_Messaging.i"
#endif /* __ACE_INLINE__ */