diff options
author | bala <balanatarajan@users.noreply.github.com> | 2000-01-09 22:23:23 +0000 |
---|---|---|
committer | bala <balanatarajan@users.noreply.github.com> | 2000-01-09 22:23:23 +0000 |
commit | d57c0d80b5a61b7dc1eb0ec0274032c4d493c7ce (patch) | |
tree | 49b20a9169db7a937b540e18fb843a2da9a0dadc | |
parent | c9965f90b7fce280609347cefc6e05fd52a9bb1e (diff) | |
download | ATCD-d57c0d80b5a61b7dc1eb0ec0274032c4d493c7ce.tar.gz |
*** empty log message ***
-rw-r--r-- | TAO/tao/GIOP_Message_Acceptors.h | 5 | ||||
-rw-r--r-- | TAO/tao/GIOP_Message_Base.cpp | 10 | ||||
-rw-r--r-- | TAO/tao/GIOP_Message_Base.h | 29 | ||||
-rw-r--r-- | TAO/tao/GIOP_Message_Connectors.h | 26 | ||||
-rw-r--r-- | TAO/tao/Pluggable_Messaging.cpp | 1 | ||||
-rw-r--r-- | TAO/tao/Pluggable_Messaging.h | 48 | ||||
-rw-r--r-- | TAO/tao/Pluggable_Messaging_Utils.h | 4 |
7 files changed, 80 insertions, 43 deletions
diff --git a/TAO/tao/GIOP_Message_Acceptors.h b/TAO/tao/GIOP_Message_Acceptors.h index 471b8217712..c530bce8714 100644 --- a/TAO/tao/GIOP_Message_Acceptors.h +++ b/TAO/tao/GIOP_Message_Acceptors.h @@ -10,7 +10,7 @@ // GIOP_Message_Acceptors.h // // = DESCRIPTION -// +// Implementation interface for the Server side of GIOP classes. // // = AUTHOR // Balachandran Natarajan <bala@cs.wustl.edu> @@ -27,7 +27,10 @@ class TAO_Export TAO_GIOP_Message_Acceptors: public TAO_GIOP_Message_Base { // = TITLE + // TAO_GIOP_Message_Acceptors // = DESCRIPTION + // This class provides a comprehensive set of interfaces for the + // server side of the GIOP classes. public: diff --git a/TAO/tao/GIOP_Message_Base.cpp b/TAO/tao/GIOP_Message_Base.cpp index 4fef9e74ae4..a1e48252b6a 100644 --- a/TAO/tao/GIOP_Message_Base.cpp +++ b/TAO/tao/GIOP_Message_Base.cpp @@ -11,10 +11,12 @@ TAO_GIOP_Message_Base::TAO_GIOP_Message_Base (void) { + //no-op } TAO_GIOP_Message_Base::~TAO_GIOP_Message_Base (void) { + //no-op } CORBA::Boolean @@ -25,7 +27,7 @@ TAO_GIOP_Message_Base:: TAO_GIOP_Message_Type type; - // First convert the Pluggable + // First convert the Pluggable type to the GIOP specific type. switch (t) { case (TAO_PLUGGABLE_MESSAGE_REQUEST): @@ -76,7 +78,7 @@ TAO_GIOP_Message_Base:: // version info , Bala msg.write_octet (TAO_ENCAP_BYTE_ORDER); - msg.write_octet ((CORBA::Octet) t); + msg.write_octet ((CORBA::Octet) type); // Write a dummy <size> later it is set to the right value... CORBA::ULong size = 0; @@ -95,7 +97,7 @@ TAO_GIOP_Message_Base:: { switch (header_type) { - case TAO_REQUEST_HEADER: + case TAO_PLUGGABLE_MESSAGE_REQUEST_HEADER: this->write_request_header (params.svc_ctx, params.request_id, params.response_flags, @@ -103,7 +105,7 @@ TAO_GIOP_Message_Base:: params.operation_name, cdr); break; - case TAO_LOCATE_REQUEST_HEADER: + case TAO_PLUUGABLE_MESSAGE_LOCATE_REQUEST_HEADER: this->write_locate_request_header (params.request_id, spec, cdr); diff --git a/TAO/tao/GIOP_Message_Base.h b/TAO/tao/GIOP_Message_Base.h index 5238f9e63d4..392e25afab7 100644 --- a/TAO/tao/GIOP_Message_Base.h +++ b/TAO/tao/GIOP_Message_Base.h @@ -7,7 +7,7 @@ // TAO // // = FILENAME -// GIOP_Message.h +// GIOP_Message_Base.h // // = DESCRIPTION // Interface for the GIOP messaging protocol @@ -28,15 +28,13 @@ class TAO_Export TAO_GIOP_Message_Base : public TAO_Pluggable_Messaging_Interface { // = TITLE - // Definitions of client side of the GIOP specific stuff + // Definitions of GIOP specific stuff // // = DESCRIPTION // This class will hold the specific details common to all the // GIOP versions. Some of them which are here may be shifted if // things start changing between versions - // IMPORTANT: This code was based on the GIOP.h & GIOP.cpp - public: TAO_GIOP_Message_Base (void); @@ -45,24 +43,26 @@ public: virtual CORBA::Boolean write_protocol_header (TAO_Pluggable_Message_Type t, TAO_OutputCDR &msg); - // Shouldnt be needed here but for compilation + // Writes the GIOP header in to <msg> int handle_input (TAO_Transport *transport, TAO_ORB_Core *orb_core, TAO_Message_State_Factory &mesg_state, ACE_Time_Value *max_time_value = 0); + // Reads input from the transport virtual CORBA::Boolean write_message_header (const TAO_Pluggable_Connector_Params ¶ms, TAO_Pluggable_Header_Type header_type, TAO_Target_Specification &spec, TAO_OutputCDR &msg); - // Write the header. + // Write the header defined by <header_type> in to <msg> int send_message (TAO_Transport *transport, TAO_OutputCDR &stream, ACE_Time_Value *max_wait_time = 0, TAO_Stub *stub = 0); + // Sends the encapsulated stream in <stream> on to the transport virtual int parse_reply (TAO_Message_State_Factory &mesg_state, TAO_Pluggable_Connector_Params ¶ms, @@ -108,12 +108,13 @@ protected: // later date use wherein things can changes in GIOP int send_error (TAO_Transport *transport); + // Send error messages private: - - virtual CORBA::Octet major_version (void) = 0; virtual CORBA::Octet minor_version (void) = 0; + // These virtual methods need will give the major and minor versions + // of the GIOP classes that are active. virtual CORBA::Boolean write_request_header (const IOP::ServiceContextList& svc_ctx, @@ -122,25 +123,29 @@ private: TAO_Target_Specification &spec, const char* opname, TAO_OutputCDR &msg) = 0; - // Write the GIOP request header. + // Write the GIOP request header in to <msg> virtual CORBA::Boolean write_locate_request_header (CORBA::ULong request_id, TAO_Target_Specification &spec, TAO_OutputCDR &msg) = 0; - // Write the GIOP locate request header. + // Write the GIOP locate request header in to <msg> - int read_bytes_input (TAO_Transport *transport, TAO_InputCDR &input, CORBA::ULong read_size, ACE_Time_Value *max_wait_time); + // This a helper that would read the <reade_size> bytes from + // <transport> in to the <inout> stream. virtual int validate_version (TAO_GIOP_Message_State *state) = 0; + // This will do a validation of the versions that arrive in the transport. virtual int parse_header (TAO_GIOP_Message_State *state); + // Parses the header of the GIOP messages for validity virtual int parse_magic_bytes (TAO_GIOP_Message_State *state); + // validates the first 4 bytes that contain the magic word "GIOP" ssize_t read_buffer (TAO_Transport *transport, char *buf, @@ -150,7 +155,6 @@ private: // will trim it down in the next iteration... @@Bala - void send_close_connection (const TAO_GIOP_Version &version, TAO_Transport *transport, void *ctx); @@ -163,7 +167,6 @@ const size_t TAO_GIOP_VERSION_MINOR_OFFSET = 5; const size_t TAO_GIOP_VERSION_MAJOR_OFFSET = 4; const size_t TAO_GIOP_MESSAGE_FLAGS_OFFSET = 6; const size_t TAO_GIOP_MESSAGE_TYPE_OFFSET = 7; -//const size_t TAO_GIOP_MESSAGE_SIZE_OFFSET = 8; #if defined (__ACE_INLINE__) # include "tao/GIOP_Message_Base.i" diff --git a/TAO/tao/GIOP_Message_Connectors.h b/TAO/tao/GIOP_Message_Connectors.h index 37c886c397d..74ffac9ddb1 100644 --- a/TAO/tao/GIOP_Message_Connectors.h +++ b/TAO/tao/GIOP_Message_Connectors.h @@ -10,7 +10,7 @@ // GIOP_Message_Connectors.h // // = DESCRIPTION -// +// Interface for the client side of the GIOP classes // // = AUTHOR // Balachandran Natarajan <bala@cs.wustl.edu> @@ -24,7 +24,12 @@ class TAO_Export TAO_GIOP_Message_Connectors: public TAO_GIOP_Message_Base { // = TITLE + // TAO_GIOP_Message_Connectors // = DESCRIPTION + // This class provides methods and code for the connector specific + // functionality of GIOP.The motivation for this class is to hold + // common code between different versions of GIOP in a single + // class. int process_connector_messages (TAO_Transport *transport, TAO_ORB_Core *orb_core, @@ -53,20 +58,30 @@ private: write_locate_request_header (CORBA::ULong request_id, TAO_Target_Specification &spec, TAO_OutputCDR &msg) = 0; - + // Need not be here. But just for the sake of documentaion. int validate_version (TAO_GIOP_Message_State *state); CORBA::Octet major_version (void) = 0; CORBA::Octet minor_version (void) = 0; + // Virtual methods that will be implemented by the version specific + // class. There may be a feeling that this declaration may not be + // required, but some of the code in the class look for this method }; +////////////////////////////////////////////////// +// Version specific classes of GIOP +////////////////////////////////////////////////// + class TAO_Export TAO_GIOP_Message_Connector_11: public TAO_GIOP_Message_Connectors { // = TITLE + // TAO_GIOP_Message_Connector_11 // = DESCRIPTION + // This class provides methods methods that implements the GIOP + // (1.1) specific stuff. public: private: @@ -77,25 +92,32 @@ private: TAO_Target_Specification &spec, const char* opname, TAO_OutputCDR &msg); + // Write the request header in to <msg> CORBA::Boolean write_locate_request_header (CORBA::ULong request_id, TAO_Target_Specification &spec, TAO_OutputCDR &msg); + // Write the locate request header in to the <msg> int parse_reply (TAO_Message_State_Factory &mesg_state, TAO_Pluggable_Connector_Params ¶ms, CORBA::ULong &reply_status); + // Parse the reply messages from the server CORBA::Octet major_version (void); CORBA::Octet minor_version (void); + // Our minor and major versions }; class TAO_Export TAO_GIOP_Message_Connector_10: public TAO_GIOP_Message_Connector_11 { // = TITLE + // TAO_GIOP_Message_Connector_10 // = DESCRIPTION + // This class is deribed from the 1.1 version of GIOP. At presnt + // this only returns the right version number public: private: diff --git a/TAO/tao/Pluggable_Messaging.cpp b/TAO/tao/Pluggable_Messaging.cpp index 005bb238eb3..51d58ceb622 100644 --- a/TAO/tao/Pluggable_Messaging.cpp +++ b/TAO/tao/Pluggable_Messaging.cpp @@ -19,4 +19,5 @@ TAO_Pluggable_Messaging_Interface::~TAO_Pluggable_Messaging_Interface (void) TAO_Message_State_Factory::~TAO_Message_State_Factory (void) { + //no-op } diff --git a/TAO/tao/Pluggable_Messaging.h b/TAO/tao/Pluggable_Messaging.h index f1c214d0071..9a916317d5b 100644 --- a/TAO/tao/Pluggable_Messaging.h +++ b/TAO/tao/Pluggable_Messaging.h @@ -32,7 +32,8 @@ class TAO_Export TAO_Pluggable_Messaging_Interface // Generic definitions Messaging class. // // = DESCRIPTION - // + // This interface tries to define generic methods that could be + // different messaging protocols public: virtual ~TAO_Pluggable_Messaging_Interface (void); @@ -42,24 +43,36 @@ public: TAO_ORB_Core *orb_core, TAO_Message_State_Factory &mesg_state, ACE_Time_Value *max_time_value) = 0; + // This method reads the input from the transport layer. + virtual int send_message (TAO_Transport *transport, + TAO_OutputCDR &stream, + ACE_Time_Value *max_wait_time = 0, + TAO_Stub *stub = 0) = 0; + // This is a complement of the previous method. This method sends + // the CDR through the transport layer + virtual CORBA::Boolean write_message_header (const TAO_Pluggable_Connector_Params ¶ms, TAO_Pluggable_Header_Type header_type, TAO_Target_Specification &spec, TAO_OutputCDR &msg) = 0; - // Write the header. - 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. + // Start writing the header of a message type stream <msg>. This is + // influenced by GIOP, which has the protocol header, followed by + // the message specific header with the message at the end. + virtual CORBA::Boolean write_protocol_header (TAO_Pluggable_Message_Type t, - TAO_OutputCDR &msg) = 0; - // Start writing the header for a message in to the stream <msg> + TAO_OutputCDR &msg) + = 0; + // This is a generic method that is used to write the protocol + // header in to the Output CDR stream. This may not be really + // necessary, but our Invocation classes seesm to be looking for + // something like this. Further, the invocation classes seem to do + // what our IDL compiler wants. + virtual int parse_reply (TAO_Message_State_Factory &state, @@ -71,7 +84,8 @@ public: TAO_ORB_Core *orb_core, TAO_InputCDR &input, CORBA::Octet message_type) = 0; - // Process messages from the connectors + // Process messages from the connectors. This is the hert of the + // server side processing }; @@ -90,6 +104,9 @@ class TAO_Export TAO_Message_State_Factory // 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. + + // @@The above comments are the intent. Will be doing so in the next + // stage of work. public: virtual ~TAO_Message_State_Factory (void); // Dtor @@ -97,17 +114,6 @@ public: 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: - }; diff --git a/TAO/tao/Pluggable_Messaging_Utils.h b/TAO/tao/Pluggable_Messaging_Utils.h index f86c25416de..22838e85c17 100644 --- a/TAO/tao/Pluggable_Messaging_Utils.h +++ b/TAO/tao/Pluggable_Messaging_Utils.h @@ -42,8 +42,8 @@ typedef enum HeaderType // = TITLE // = DESCRIPTION // - TAO_REQUEST_HEADER = 0, - TAO_LOCATE_REQUEST_HEADER + TAO_PLUGGABLE_MESSAGE_REQUEST_HEADER = 0, + TAO_PLUGGABLE_MESSAGE_LOCATE_REQUEST_HEADER }TAO_Pluggable_Header_Type; |