From 155fe26172c7d4a1773ad8f81489e6810f7c22f2 Mon Sep 17 00:00:00 2001 From: fhunleth Date: Sat, 12 Jan 2002 21:33:25 +0000 Subject: Added the rq --- TAO/tao/Request_Dispatcher.cpp | 27 ++++++++++++++++++++++++ TAO/tao/Request_Dispatcher.h | 48 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+) create mode 100644 TAO/tao/Request_Dispatcher.cpp create mode 100644 TAO/tao/Request_Dispatcher.h diff --git a/TAO/tao/Request_Dispatcher.cpp b/TAO/tao/Request_Dispatcher.cpp new file mode 100644 index 00000000000..4c4d6db3a02 --- /dev/null +++ b/TAO/tao/Request_Dispatcher.cpp @@ -0,0 +1,27 @@ +// $Id$ + +#include "Request_Dispatcher.h" +#include "TAO_Server_Request.h" +#include "ORB_Core.h" + +ACE_RCSID(tao, GIOP_Message_Base, "$Id$") + +TAO_Request_Dispatcher::~TAO_Request_Dispatcher (void) +{ +} + +void +TAO_Request_Dispatcher::dispatch (TAO_ORB_Core *orb_core, + TAO_ServerRequest &request, + CORBA::Object_out forward_to + TAO_ENV_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + // Dispatch based on object key + orb_core->adapter_registry ()->dispatch (request.object_key (), + request, + forward_to + TAO_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; +} + diff --git a/TAO/tao/Request_Dispatcher.h b/TAO/tao/Request_Dispatcher.h new file mode 100644 index 00000000000..4231dd684ef --- /dev/null +++ b/TAO/tao/Request_Dispatcher.h @@ -0,0 +1,48 @@ +//-*- C++ -*- + +//============================================================================= +/** + * @file Request_Dispatcher.h + * + * $Id$ + * + * A class that strategizes the request dispatching procedure. + * + * @author Frank Hunleth + */ +//============================================================================= + + +#ifndef TAO_REQUEST_DISPATCHER_H +#define TAO_REQUEST_DISPATCHER_H +#include "ace/pre.h" + +#include "tao/Object_KeyC.h" +#include "tao/IOPC.h" + + +/** + * @class TAO_Request_Dispatcher + * + * @brief A class that strategizes the request dispatching procedure. + * + */ +class TAO_Export TAO_Request_Dispatcher +{ +public: + /// Destructor. + virtual ~TAO_Request_Dispatcher (void); + + /** + * Dispatch a request. + */ + virtual void dispatch (TAO_ORB_Core *orb_core, + TAO_ServerRequest &request, + CORBA::Object_out forward_to + TAO_ENV_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException)); + +}; + +#include "ace/post.h" +#endif /* TAO_REQUEST_DISPATCHER_H */ -- cgit v1.2.1