summaryrefslogtreecommitdiff
path: root/ace/QoS_Decorator.h
diff options
context:
space:
mode:
Diffstat (limited to 'ace/QoS_Decorator.h')
-rw-r--r--ace/QoS_Decorator.h155
1 files changed, 79 insertions, 76 deletions
diff --git a/ace/QoS_Decorator.h b/ace/QoS_Decorator.h
index c2d9163539d..901cd8d5ff1 100644
--- a/ace/QoS_Decorator.h
+++ b/ace/QoS_Decorator.h
@@ -1,18 +1,15 @@
/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ACE_wrappers/ace
-//
-// = FILENAME
-// QOS_Decorator.h
-//
-// = AUTHOR
-// Vishal Kachroo <vishal@cs.wustl.edu>
-//
-// ============================================================================
+
+//=============================================================================
+/**
+ * @file QOS_Decorator.h
+ *
+ * $Id$
+ *
+ * @author Vishal Kachroo <vishal@cs.wustl.edu>
+ */
+//=============================================================================
+
#ifndef QOS_DECORATOR_H
#define QOS_DECORATOR_H
@@ -29,143 +26,149 @@
#include "ace/SOCK_Dgram_Mcast_QoS.h"
ACE_RCSID(QOS_Decorator, QOS_Decorator, "$Id$")
-
+
+/**
+ * @class ACE_QoS_Decorator_Base
+ *
+ * @brief This class is the Decorator Pattern Base class for decorating
+ * ACE_Event_Handler.
+ *
+ * It simply forwards the requests for get_handle (),
+ * handle_input () and handle_qos () to its event_handler_
+ * component. Concrete decorators for ACE_Event_Handler will use
+ * this class to access the basic event handler functionality and
+ * decorate that by their own implementation.
+ */
class ACE_Export ACE_QoS_Decorator_Base : public ACE_Event_Handler
{
- // = TITLE
- // This class is the Decorator Pattern Base class for decorating
- // ACE_Event_Handler.
- //
- // = DESCRIPTION
- // It simply forwards the requests for get_handle (),
- // handle_input () and handle_qos () to its event_handler_
- // component. Concrete decorators for ACE_Event_Handler will use
- // this class to access the basic event handler functionality and
- // decorate that by their own implementation.
-
+
public:
-
+
// Initialization and termination methods.
+ /// Constructor.
ACE_QoS_Decorator_Base (void);
- // Constructor.
+ /// Constructor.
ACE_QoS_Decorator_Base (ACE_Event_Handler *event_handler);
- // Constructor.
+ /// Destructor.
~ACE_QoS_Decorator_Base (void);
- // Destructor.
+ /// Forwards the request to its event_handler_ component.
virtual ACE_HANDLE get_handle (void) const;
- // Forwards the request to its event_handler_ component.
+ /// Forwards the request to its event_handler_ component.
virtual int handle_input (ACE_HANDLE fd);
- // Forwards the request to its event_handler_ component.
+ /// Forwards the request to its event_handler_ component.
virtual int handle_qos (ACE_HANDLE fd);
- // Forwards the request to its event_handler_ component.
private:
-
+
+ /// The event handler that is decorated by this class.
ACE_Event_Handler *event_handler_;
- // The event handler that is decorated by this class.
};
-class ACE_Export ACE_QoS_Event_Handler : public ACE_Event_Handler
+/**
+ * @class ACE_QoS_Event_Handler
+ *
+ * @brief This Handler is registered with the Reactor for QoS events.
+ *
+ * Concrete QoS decorator uses this class to receive QoS events
+ * for RAPI. It hides the application from knowing that it is
+ * receiving QoS events on a different socket so the application
+ * doesnt have to be designed differently for RAPI and GQoS.
+ */
+class ACE_Export ACE_QoS_Event_Handler : public ACE_Event_Handler
{
- // = TITLE
- // This Handler is registered with the Reactor for QoS events.
- //
- // = DESCRIPTION
- // Concrete QoS decorator uses this class to receive QoS events
- // for RAPI. It hides the application from knowing that it is
- // receiving QoS events on a different socket so the application
- // doesnt have to be designed differently for RAPI and GQoS.
+ /// Destructor.
~ACE_QoS_Event_Handler (void);
- // Destructor.
+ /// Returns the RAPI file descriptor for receiving QoS events.
virtual ACE_HANDLE get_handle (void) const;
- // Returns the RAPI file descriptor for receiving QoS events.
+ /// Calls the base class handle_input ().
virtual int handle_input (ACE_HANDLE fd);
- // Calls the base class handle_input ().
+ /// Sets the QoS session.
void qos_session (ACE_QoS_Session *qos_session);
- // Sets the QoS session.
friend class ACE_QoS_Decorator;
private:
+ /// Constructor is private because only ACE_QoS_Decorator should
+ /// create this object.
ACE_QoS_Event_Handler (void);
- // Constructor is private because only ACE_QoS_Decorator should
- // create this object.
+ /// The QoS Decorator passes in its base for this handler to use.
ACE_QoS_Event_Handler (ACE_QoS_Decorator_Base *decorator_base);
- // The QoS Decorator passes in its base for this handler to use.
+ /// Used to get to the RAPI file descriptor for QoS Events.
ACE_QoS_Session *qos_session_;
- // Used to get to the RAPI file descriptor for QoS Events.
+ /// Requests on the class are forwarded to this base class;
ACE_QoS_Decorator_Base *decorator_base_;
- // Requests on the class are forwarded to this base class;
};
+/**
+ * @class ACE_QoS_Decorator
+ *
+ * @brief Concrete QoS Decorator.
+ *
+ * Decorates the ACE_Event_Handler to additionally handle QoS
+ * events uniformly for different QoS mechanisms like RAPI and
+ * GQoS.
+ */
class ACE_Export ACE_QoS_Decorator : public ACE_QoS_Decorator_Base
{
- // = TITLE
- // Concrete QoS Decorator.
- //
- // = DESCRIPTION
- // Decorates the ACE_Event_Handler to additionally handle QoS
- // events uniformly for different QoS mechanisms like RAPI and
- // GQoS.
public:
// Initialization and termination methods.
+ /// Constructor.
ACE_QoS_Decorator (void);
- // Constructor.
+ /// Constructor.
ACE_QoS_Decorator (ACE_Event_Handler *event_handler,
ACE_QoS_Session *qos_session,
ACE_Reactor *reactor = ACE_Reactor::instance ());
- // Constructor.
+ /// Destructor.
~ACE_QoS_Decorator (void);
- // Destructor.
+ /// Calls the base class get_handle ().
virtual ACE_HANDLE get_handle (void) const;
- // Calls the base class get_handle ().
+ /// Calls the base class handle_input ().
virtual int handle_input (ACE_HANDLE fd);
- // Calls the base class handle_input ().
+ /// Calls the base class handle_qos ().
virtual int handle_qos (ACE_HANDLE fd);
- // Calls the base class handle_qos ().
-
+
+ /// This method registers the QoS Event Handler with the Reactor
+ /// to receive RAPI events.
int init (void);
- // This method registers the QoS Event Handler with the Reactor
- // to receive RAPI events.
private:
+ /// Requests on the class are forwarded to this base class;
ACE_QoS_Decorator_Base *decorator_base_;
- // Requests on the class are forwarded to this base class;
+ /// Handles the QoS events and in that sense decorates the usual
+ /// ACE_Event_Handler.
ACE_QoS_Event_Handler *qos_event_handler_;
- // Handles the QoS events and in that sense decorates the usual
- // ACE_Event_Handler.
+ /// Passed to the ACE_QoS_Event_Handler for retrieving the RAPI
+ /// session specific information like rapi_fd.
ACE_QoS_Session *qos_session_;
- // Passed to the ACE_QoS_Event_Handler for retrieving the RAPI
- // session specific information like rapi_fd.
+ /// If the application wants to use an instance of Reactor other
+ /// than the Singleton one.
ACE_Reactor *reactor_;
- // If the application wants to use an instance of Reactor other
- // than the Singleton one.
};