Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

ACE_QoS_Decorator Class Reference

Concrete QoS Decorator. More...

#include <QoS_Decorator.h>

Inheritance diagram for ACE_QoS_Decorator:

Inheritance graph
[legend]
Collaboration diagram for ACE_QoS_Decorator:

Collaboration graph
[legend]
List of all members.

Public Methods

 ACE_QoS_Decorator (void)
 Constructor. More...

 ACE_QoS_Decorator (ACE_Event_Handler *event_handler, ACE_QoS_Session *qos_session, ACE_Reactor *reactor=ACE_Reactor::instance())
 Constructor. More...

 ~ACE_QoS_Decorator (void)
 Destructor. More...

virtual ACE_HANDLE get_handle (void) const
 Calls the base class get_handle (). More...

virtual int handle_input (ACE_HANDLE fd)
 Calls the base class handle_input (). More...

virtual int handle_qos (ACE_HANDLE fd)
 Calls the base class handle_qos (). More...

int init (void)
 This method registers the QoS Event Handler with the Reactor to receive RAPI events. More...


Private Attributes

ACE_QoS_Decorator_Basedecorator_base_
 Requests on the class are forwarded to this base class;. More...

ACE_QoS_Event_Handlerqos_event_handler_
 Handles the QoS events and in that sense decorates the usual ACE_Event_Handler. More...

ACE_QoS_Sessionqos_session_
 Passed to the ACE_QoS_Event_Handler for retrieving the RAPI session specific information like rapi_fd. More...

ACE_Reactorreactor_
 If the application wants to use an instance of Reactor other than the Singleton one. More...


Detailed Description

Concrete QoS Decorator.

Decorates the ACE_Event_Handler to additionally handle QoS events uniformly for different QoS mechanisms like RAPI and GQoS.

Definition at line 127 of file QoS_Decorator.h.


Constructor & Destructor Documentation

ACE_QoS_Decorator::ACE_QoS_Decorator void   
 

Constructor.

Definition at line 48 of file QoS_Decorator.cpp.

00049 {}

ACE_QoS_Decorator::ACE_QoS_Decorator ACE_Event_Handler   event_handler,
ACE_QoS_Session   qos_session,
ACE_Reactor   reactor = ACE_Reactor::instance()
 

Constructor.

Definition at line 52 of file QoS_Decorator.cpp.

References ACE_NEW.

00055   : qos_session_ (qos_session),
00056     reactor_ (reactor)
00057 {
00058   ACE_NEW (this->decorator_base_,
00059            ACE_QoS_Decorator_Base (event_handler));
00060 
00061   ACE_NEW (this->qos_event_handler_,
00062            ACE_QoS_Event_Handler (this->decorator_base_));
00063 }

ACE_QoS_Decorator::~ACE_QoS_Decorator void   
 

Destructor.

Definition at line 66 of file QoS_Decorator.cpp.

References decorator_base_, and qos_event_handler_.

00067 {
00068   delete this->decorator_base_;
00069   delete this->qos_event_handler_;
00070 }


Member Function Documentation

ACE_HANDLE ACE_QoS_Decorator::get_handle void    const [virtual]
 

Calls the base class get_handle ().

Reimplemented from ACE_QoS_Decorator_Base.

Definition at line 76 of file QoS_Decorator.cpp.

References decorator_base_, and ACE_QoS_Decorator_Base::get_handle.

00077 {
00078   return this->decorator_base_->get_handle ();
00079 }

int ACE_QoS_Decorator::handle_input ACE_HANDLE    fd [virtual]
 

Calls the base class handle_input ().

Reimplemented from ACE_QoS_Decorator_Base.

Definition at line 85 of file QoS_Decorator.cpp.

References decorator_base_, and ACE_QoS_Decorator_Base::handle_input.

00086 {
00087   return this->decorator_base_->handle_input (fd);
00088 }

int ACE_QoS_Decorator::handle_qos ACE_HANDLE    fd [virtual]
 

Calls the base class handle_qos ().

Reimplemented from ACE_QoS_Decorator_Base.

Definition at line 94 of file QoS_Decorator.cpp.

References decorator_base_, and ACE_QoS_Decorator_Base::handle_qos.

00095 {
00096   return this->decorator_base_->handle_qos (fd);
00097 }

int ACE_QoS_Decorator::init void   
 

This method registers the QoS Event Handler with the Reactor to receive RAPI events.

Definition at line 103 of file QoS_Decorator.cpp.

References qos_event_handler_, ACE_QoS_Event_Handler::qos_session, reactor_, ACE_Event_Handler::READ_MASK, and ACE_Reactor::register_handler.

00104 {
00105 #if defined (ACE_HAS_RAPI)
00106 
00107   // Pass the QoS session to QoS Event Handler.
00108   this->qos_event_handler_->qos_session (this->qos_session_);
00109 
00110   // Register the QoS Event Handler with the Reactor.
00111   return this->reactor_->register_handler (this->qos_event_handler_,
00112                                            ACE_Event_Handler::READ_MASK);
00113 #endif
00114   return 0;
00115 
00116 }


Member Data Documentation

ACE_QoS_Decorator_Base* ACE_QoS_Decorator::decorator_base_ [private]
 

Requests on the class are forwarded to this base class;.

Definition at line 160 of file QoS_Decorator.h.

Referenced by get_handle, handle_input, handle_qos, and ~ACE_QoS_Decorator.

ACE_QoS_Event_Handler* ACE_QoS_Decorator::qos_event_handler_ [private]
 

Handles the QoS events and in that sense decorates the usual ACE_Event_Handler.

Definition at line 164 of file QoS_Decorator.h.

Referenced by init, and ~ACE_QoS_Decorator.

ACE_QoS_Session* ACE_QoS_Decorator::qos_session_ [private]
 

Passed to the ACE_QoS_Event_Handler for retrieving the RAPI session specific information like rapi_fd.

Definition at line 168 of file QoS_Decorator.h.

ACE_Reactor* ACE_QoS_Decorator::reactor_ [private]
 

If the application wants to use an instance of Reactor other than the Singleton one.

Reimplemented from ACE_Event_Handler.

Definition at line 172 of file QoS_Decorator.h.

Referenced by init.


The documentation for this class was generated from the following files:
Generated on Mon Jun 16 13:17:43 2003 for ACE_QoS by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002