summaryrefslogtreecommitdiff
path: root/TAO/tao/DynamicInterface/Server_Request.h
diff options
context:
space:
mode:
authorparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-10-31 18:14:53 +0000
committerparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-10-31 18:14:53 +0000
commitb60b85d8455663b44af5a8ab90e01b28211e2aa4 (patch)
tree459333aaeffce07d580e66cfefcbc6a9b550b942 /TAO/tao/DynamicInterface/Server_Request.h
parent6441a72082acd62852c9f7ccdd90aec8665821d2 (diff)
downloadATCD-b60b85d8455663b44af5a8ab90e01b28211e2aa4.tar.gz
ChangeLogTag: Tue Oct 31 12:01:10 2000 Jeff Parsons <parsons@cs.wustl.edu>
Diffstat (limited to 'TAO/tao/DynamicInterface/Server_Request.h')
-rw-r--r--TAO/tao/DynamicInterface/Server_Request.h145
1 files changed, 145 insertions, 0 deletions
diff --git a/TAO/tao/DynamicInterface/Server_Request.h b/TAO/tao/DynamicInterface/Server_Request.h
new file mode 100644
index 00000000000..3efb9a7d1aa
--- /dev/null
+++ b/TAO/tao/DynamicInterface/Server_Request.h
@@ -0,0 +1,145 @@
+// This may look like C, but it's really -*- C++ -*-
+// $Id$
+
+// ============================================================================
+//
+// = LIBRARY
+// TAO
+//
+// = FILENAME
+// Server_Request.h
+//
+// = DESCRIPTION
+// Header file for CORBA's Dynamic Server Skeleton Interface's
+// "Server Request" type.
+//
+// = AUTHOR
+// Copyright 1994-1995 by Sun Microsystems, Inc. and Chris Cleeland.
+// Modifications by Aniruddha Gokhale based on CORBAv2.2 Feb 98
+// ============================================================================
+
+#ifndef TAO_CORBA_SERVER_REQUEST_H
+#define TAO_CORBA_SERVER_REQUEST_H
+#include "ace/pre.h"
+
+#include "tao/corbafwd.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "Context.h"
+#include "tao/TAO_Server_Request.h"
+
+class TAO_DynamicInterface_Export CORBA_ServerRequest
+{
+ // = TITLE
+ // Class representing the CORBA ServerRequest pseudo-object.
+ //
+ // = DESCRIPTION
+ // Instantiated by the POA for DSI requests and passed up
+ // to the application. Contains a reference to the instance
+ // of TAO_ServerRequest that is passed up to the POA from
+ // the ORB.
+public:
+ CORBA_ServerRequest (TAO_ServerRequest &orb_server_request);
+ // Constructor.
+
+ ~CORBA_ServerRequest (void);
+ // Destructor.
+
+ void arguments (CORBA::NVList_ptr &list,
+ CORBA_Environment &ACE_TRY_ENV =
+ TAO_default_environment ());
+ // Implementation uses this to provide the ORB with the operation's
+ // parameter list ... on return, their values are available; the
+ // list fed in has typecodes and (perhap) memory assigned.
+
+ void set_result (const CORBA::Any &value,
+ CORBA_Environment &ACE_TRY_ENV =
+ TAO_default_environment ());
+ // Implementation uses this to provide the operation result
+ // ... illegal if exception() was called or params() was not called.
+ //
+ // XXX Implementation should be able to assume response has been
+ // sent when this returns, and reclaim memory it allocated.
+
+ void set_exception (const CORBA::Any &value,
+ CORBA_Environment &ACE_TRY_ENV =
+ TAO_default_environment ());
+ // Implementation uses this to provide the exception value which is
+ // the only result of this particular invocation.
+ //
+ // XXX Implementation should be able to assume response has been
+ // sent when this returns, and reclaim memory it allocated.
+
+ // = Get various universal call attributes.
+
+ // e.g., who made the call, the target of the call, what ORB and OA
+ // that target object uses.
+ //
+ // NOTE: none of these report exceptions; unavailability of any of
+ // this stuff is a catastrophic error since this is all part of the
+ // basic CORBA Object Model.
+
+ void dsi_marshal (CORBA_Environment &ACE_TRY_ENV =
+ TAO_default_environment ());
+ // Marshal outgoing parameters.
+
+ CORBA::Context_ptr ctx (void) const;
+ // Accessor for the Context member.
+
+ void ctx (CORBA::Context_ptr);
+ // Mutator for the Context member.
+
+ const char *operation (void) const;
+ // Get the operation name.
+
+ // Pseudo object methods.
+ static CORBA_ServerRequest_ptr _duplicate (CORBA_ServerRequest_ptr);
+ static CORBA_ServerRequest_ptr _nil (void);
+
+ // = Reference counting.
+ CORBA::ULong _incr_refcnt (void);
+ CORBA::ULong _decr_refcnt (void);
+
+ void _tao_lazy_evaluation (int lazy_evaluation);
+ // Set the lazy evaluation flag.
+
+#if !defined(__GNUC__) || __GNUC__ > 2 || __GNUC_MINOR__ >= 8
+ typedef CORBA::ServerRequest_ptr _ptr_type;
+#endif /* __GNUC__ */
+ // Useful for template programming.
+
+private:
+ int lazy_evaluation_;
+ // If zero then the NVList is evaluated ASAP.
+
+ CORBA::Context_ptr ctx_;
+ // Context associated with this request.
+
+ CORBA::NVList_ptr params_;
+ // Incoming parameters.
+
+ CORBA::Any_ptr retval_;
+ // Return value.
+
+ CORBA::Any_ptr exception_;
+ // Any exception which might be raised.
+
+ CORBA::ULong refcount_;
+ // Reference counting.
+
+ ACE_SYNCH_MUTEX lock_;
+ // Protect the refcount_ and response_receieved_.
+
+ TAO_ServerRequest &orb_server_request_;
+ // Request from the ORB.
+};
+
+#if defined (__ACE_INLINE__)
+# include "Server_Request.inl"
+#endif /* __ACE_INLINE__ */
+
+#include "ace/post.h"
+#endif /* TAO_CORBA_SERVER_REQUEST_H */