summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbala <balanatarajan@users.noreply.github.com>1999-12-11 02:35:46 +0000
committerbala <balanatarajan@users.noreply.github.com>1999-12-11 02:35:46 +0000
commit24769b41502de72321a1595a3b6633931763ff1d (patch)
tree3b242894cdb187b7d7fb518f768c4519479a2782
parent89c831d3738e7ea2ef367de9e6cd0b458e71af7a (diff)
downloadATCD-24769b41502de72321a1595a3b6633931763ff1d.tar.gz
First revision
-rw-r--r--TAO/tao/GIOP_Accept_State.h38
-rw-r--r--TAO/tao/GIOP_Message_Invocation.cpp132
-rw-r--r--TAO/tao/GIOP_Message_Invocation.h74
-rw-r--r--TAO/tao/GIOP_Message_Invocation.h~93
-rw-r--r--TAO/tao/GIOP_Message_Invocation.i1
5 files changed, 338 insertions, 0 deletions
diff --git a/TAO/tao/GIOP_Accept_State.h b/TAO/tao/GIOP_Accept_State.h
new file mode 100644
index 00000000000..38ff4502276
--- /dev/null
+++ b/TAO/tao/GIOP_Accept_State.h
@@ -0,0 +1,38 @@
+// -*- C++ -*-
+// $Id$
+
+// ============================================================================
+//
+// = LIBRARY
+// TAO
+//
+// = FILENAME
+// GIOP_Message.h
+//
+// = DESCRIPTION
+// Interface for the GIOP messaging protocol
+//
+// = AUTHOR
+// Copyright 1994-1995 by Sun Microsystems Inc.,
+// Balachandran Natarajan <bala@cs.wustl.edu>
+//
+// ============================================================================
+#ifndef _TAO_GIOP_SERVER_STATE_
+#define _TAO_GIOP_SERVER_STATE_
+
+class TAO_Export TAO_GIOP_Accept_State
+{
+ // = TITLE
+ // An abstract interface for different versions of the GIOP
+ // implementation classes.
+ //
+ // = DESCRIPTION
+ //
+ //
+public:
+
+private:
+};
+
+
+#endif /*_TAO_GIOP_SERVER_STATE_*/
diff --git a/TAO/tao/GIOP_Message_Invocation.cpp b/TAO/tao/GIOP_Message_Invocation.cpp
new file mode 100644
index 00000000000..b053a240ce0
--- /dev/null
+++ b/TAO/tao/GIOP_Message_Invocation.cpp
@@ -0,0 +1,132 @@
+//$id$
+#include "tao/GIOP_Message_1_1.h"
+#include "tao/GIOPC.h"
+#include "tao/Profile.h"
+#include "tao/Stub.h"
+#include "tao/Object_KeyC.h"
+#include "tao/Principal.h"
+
+//$Id$
+
+#if defined (__ACE_INLINE__)
+# include "tao/GIOP_Message_1_1.i"
+#endif /* __ACE_INLINE__ */
+
+TAO_GIOP_Client_Message_1_1::TAO_GIOP_Client_Message_1_1 (void)
+{
+ //no-op
+}
+
+
+TAO_GIOP_Client_Message_1_1::~TAO_GIOP_Client_Message_1_1 (void)
+{
+ //no-op
+}
+
+CORBA::Boolean
+TAO_GIOP_Client_Message_1_1::write_request_header (const IOP::ServiceContextList& svc_ctx,
+ CORBA::ULong request_id,
+ CORBA::Octet response_flags,
+ TAO_Stub *stub,
+ const CORBA::Short address_disposition,
+ const char *opname,
+ TAO_OutputCDR &msg)
+{
+ // This i sepecific to GIOP 1.1. So put them here
+ msg << svc_ctx;
+
+ // Let us call our parent class to check what he can do for
+ // us.
+ TAO_GIOP_Message_Factory::write_request_header (svc_ctx,
+ request_id,
+ response_flags,
+ stub,
+ address_disposition,
+ opname,
+ msg);
+
+ // In this case we cannot recognise anything other than the Object
+ // key as the address disposition variable. But we do a sanity check
+ // anyway.
+ if (address_disposition == GIOP::KeyAddr)
+ {
+ // Put in the object key
+ TAO_Profile *profile =
+ stub->profile_in_use ();
+
+ TAO_ObjectKey *key = profile->_key ();
+
+ msg << *key;
+ }
+ else
+ {
+ if (TAO_orbdebug)
+ ACE_DEBUG ((LM_DEBUG,
+ "(%N | %l) Unable to handle this request \n"));
+ return 0;
+ }
+
+ msg << opname;
+
+ // The principal is not used. So send a null pointer
+ static CORBA::Principal_ptr principal = 0;
+ msg << principal;
+
+
+ return 1;
+
+}
+
+
+CORBA::Boolean
+TAO_GIOP_Client_Message_1_1::
+write_locate_request_header (CORBA::ULong request_id,
+ TAO_Stub *stub,
+ const CORBA::Short address_disposition,
+ TAO_OutputCDR &msg)
+{
+ msg << request_id;
+
+ // In this case we cannot recognise anything other than the Object
+ // key as the address disposition variable. But we do a sanity check
+ // anyway.
+ if (address_disposition == GIOP::KeyAddr)
+ {
+ // Put in the object key
+ TAO_Profile *profile =
+ stub->profile_in_use ();
+
+ TAO_ObjectKey *key = profile->_key ();
+
+ // Everything is fine
+ msg << *key;
+ }
+ else
+ {
+ if (TAO_orbdebug)
+ ACE_DEBUG ((LM_DEBUG,
+ "(%N | %l) Unable to handle this request \n"));
+ return 0;
+ }
+
+ return 1;
+}
+
+
+const size_t
+TAO_GIOP_Client_Message_1_1::get_header_len (void)
+{
+ return TAO_GIOP_1_1_HEADER_LEN;
+}
+
+const size_t
+TAO_GIOP_Client_Message_1_1::get_message_size_offset (void)
+{
+ return TAO_GIOP_1_1_MESSAGE_SIZE_OFFSET;
+}
+
+
+//
+// Server Side methods for GIOP 1.1
+//
+
diff --git a/TAO/tao/GIOP_Message_Invocation.h b/TAO/tao/GIOP_Message_Invocation.h
new file mode 100644
index 00000000000..abad46ae8b5
--- /dev/null
+++ b/TAO/tao/GIOP_Message_Invocation.h
@@ -0,0 +1,74 @@
+// -*- C++ -*-
+// $Id$
+
+// ============================================================================
+//
+// = LIBRARY
+// TAO
+//
+// = FILENAME
+// GIOP_Message_Invocation.h
+//
+// = DESCRIPTION
+// Interface for the GIOP version 1.1 of the protocol
+//
+// = AUTHOR
+// Balachandran Natarajan <bala@cs.wustl.edu>
+//
+// ============================================================================
+#ifndef _TAO_GIOP_MESSAGE_1_1_H_
+#define _TAO_GIOP_MESSAGE_1_1_H_
+
+#include "tao/GIOP_Message_Factory.h"
+
+class TAO_Export TAO_GIOP_Client_Message_1_1:
+ public TAO_GIOP_Client_Message_Factory
+{
+ // = TITLE
+ // Definitions of GIOP 1.1 specific stuff
+ //
+ // = DESCRIPTION
+ // This class will hold the specific details of 1.1
+ //
+public:
+
+ TAO_GIOP_Client_Message_1_1 (void);
+ // Ctor
+
+ ~TAO_GIOP_Client_Message_1_1 (void);
+ // Dtor
+
+ CORBA::Boolean
+ write_request_header (const IOP::ServiceContextList& svc_ctx,
+ CORBA::ULong request_id,
+ CORBA::Octet response_flags,
+ TAO_Stub *stub,
+ const CORBA::Short address_disposition,
+ const char *opname,
+ TAO_OutputCDR &msg);
+ // Writes the rquest header.
+
+ CORBA::Boolean write_locate_request_header (CORBA::ULong request_id,
+ TAO_Stub *stub,
+ const CORBA::Short address_disposition,
+ TAO_OutputCDR &msg);
+ // Write the locate request header
+
+private:
+ const size_t get_header_len (void);
+ // Returns the header length
+
+ const size_t get_message_size_offset (void);
+ // Returns the message size offset
+};
+
+
+
+const size_t TAO_GIOP_1_1_HEADER_LEN = 12;
+const size_t TAO_GIOP_1_1_MESSAGE_SIZE_OFFSET = 8;
+
+#if defined (__ACE_INLINE__)
+# include "tao/GIOP_Message_1_1.i"
+#endif /* __ACE_INLINE__ */
+
+#endif /*TAO_IIOP_ACCEPTOR_1_1_H_ */
diff --git a/TAO/tao/GIOP_Message_Invocation.h~ b/TAO/tao/GIOP_Message_Invocation.h~
new file mode 100644
index 00000000000..88f5637548d
--- /dev/null
+++ b/TAO/tao/GIOP_Message_Invocation.h~
@@ -0,0 +1,93 @@
+// -*- C++ -*-
+// $Id$
+
+// ============================================================================
+//
+// = LIBRARY
+// TAO
+//
+// = FILENAME
+// GIOP_Message_1_1.h
+//
+// = DESCRIPTION
+// Interface for the GIOP version 1.1 of the protocol
+//
+// = AUTHOR
+// Balachandran Natarajan <bala@cs.wustl.edu>
+//
+// ============================================================================
+#ifndef _TAO_GIOP_MESSAGE_1_1_H_
+#define _TAO_GIOP_MESSAGE_1_1_H_
+
+#include "tao/GIOP_Message_Factory.h"
+
+class TAO_Export TAO_GIOP_Client_Message_1_1:
+ public TAO_GIOP_Client_Message_Factory
+{
+ // = TITLE
+ // Definitions of GIOP 1.1 specific stuff
+ //
+ // = DESCRIPTION
+ // This class will hold the specific details of 1.1
+ //
+public:
+
+ TAO_GIOP_Client_Message_1_1 (void);
+ // Ctor
+
+ ~TAO_GIOP_Client_Message_1_1 (void);
+ // Dtor
+
+ CORBA::Boolean
+ write_request_header (const IOP::ServiceContextList& svc_ctx,
+ CORBA::ULong request_id,
+ CORBA::Octet response_flags,
+ TAO_Stub *stub,
+ const CORBA::Short address_disposition,
+ const char *opname,
+ TAO_OutputCDR &msg);
+ // Writes the rquest header.
+
+ CORBA::Boolean write_locate_request_header (CORBA::ULong request_id,
+ TAO_Stub *stub,
+ const CORBA::Short address_disposition,
+ TAO_OutputCDR &msg);
+ // Write the locate request header
+
+
+
+
+ /**********************************************************/
+ // Methods related to the messages that would be sent by the server.
+ /**********************************************************/
+ int handle_input (TAO_Transport *transport,
+ TAO_ORB_Core *orb_core,
+ TAO_GIOP_Message_State &state,
+ ACE_Time_Value *max_wait_time = 0);
+
+private:
+ const size_t get_header_len (void);
+ // Returns the header length
+
+ const size_t get_message_size_offset (void);
+ // Returns the message size offset
+};
+
+class TAO_Export TAO_GIOP_Server_Message_1_1:
+ public TAO_GIOP_Server_Message_Factory
+{
+ // = TITLE
+ // Definitions of GIOP 1.1 specific stuff
+ //
+ // = DESCRIPTION
+ // This class will hold the specific details of 1.1
+ //
+};
+const size_t TAO_GIOP_1_1_HEADER_LEN = 12;
+const size_t TAO_GIOP_1_1_MESSAGE_SIZE_OFFSET = 8;
+
+#if defined (__ACE_INLINE__)
+# include "tao/GIOP_Message_1_1.i"
+#endif /* __ACE_INLINE__ */
+
+#endif /*TAO_IIOP_ACCEPTOR_1_1_H_ */
diff --git a/TAO/tao/GIOP_Message_Invocation.i b/TAO/tao/GIOP_Message_Invocation.i
new file mode 100644
index 00000000000..ca0908bbcf6
--- /dev/null
+++ b/TAO/tao/GIOP_Message_Invocation.i
@@ -0,0 +1 @@
+//$Id$