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

QoS_Session_Factory.h

Go to the documentation of this file.
00001 /* -*- C++ -*- */
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    QoS_Session_Factory.h
00006  *
00007  *  $Id: QoS_Session_Factory.h,v 1.1.1.2 2003/02/21 18:36:32 chad Exp $
00008  *
00009  *  @author Vishal Kachroo <vishal@cs.wustl.edu>
00010  */
00011 //=============================================================================
00012 
00013 
00014 #ifndef ACE_QOS_SESSION_FACTORY_H
00015 #define ACE_QOS_SESSION_FACTORY_H
00016 #include "ace/pre.h"
00017 
00018 #include "ace/QoS/QoS_Session.h"
00019 
00020 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00021 # pragma once
00022 #endif /* ACE_LACKS_PRAGMA_ONCE */
00023 
00024 #include "ace/Containers_T.h"
00025 #include "ACE_QoS_Export.h"
00026 
00027 // Forward declare this, so the factory uses only references to this.
00028 class ACE_QoS_Session;
00029 
00030 /**
00031  * @class ACE_QoS_Session_Factory
00032  *
00033  * @brief Concrete factory for the QoS Session objects.
00034  *
00035  * This class manages the life cycle of QoS Session objects. These
00036  * objects are currently either RAPI session objects or GQoS session
00037  * objects. It stores the sessions in an unbounded set.
00038  */
00039 class ACE_QoS_Export ACE_QoS_Session_Factory
00040 {
00041 
00042 public :
00043 
00044   // = Initialization and termination methods.
00045   /// Default constructor.
00046   ACE_QoS_Session_Factory (void);
00047 
00048   /// Default destructor.
00049   ~ACE_QoS_Session_Factory (void);
00050 
00051 
00052   /// Types of sessions for this factory to manage.
00053   enum ACE_QoS_Session_Type
00054   {
00055     /// ACE_RAPI_SESSION on Unix platforms with RAPI support
00056     ACE_RAPI_SESSION,
00057 
00058     /// ACE_GQOS_SESSION on Windows platforms with GQOS support
00059     ACE_GQOS_SESSION
00060   };
00061 
00062   /**  The default QoS type supported on this platform.
00063     *
00064     *       ACE_DEFAULT_QOS_SESSION = ACE_RAPI_SESSION on Unix platforms with RAPI support
00065     *                               = ACE_GQOS_SESSION on Windows platforms with GQOS support
00066     */
00067   static const enum ACE_QoS_Session_Type ACE_DEFAULT_QOS_SESSION;
00068 
00069   /// Create a QoS session of the given type (RAPI or GQoS).
00070   ACE_QoS_Session * create_session (ACE_QoS_Session_Type qos_session_type = ACE_DEFAULT_QOS_SESSION );
00071 
00072   /// Destroy the QoS Session.
00073   int destroy_session (ACE_QoS_Session *qos_session);
00074 
00075 private:
00076 
00077   /// Used by the create_session () to add new sessions to the
00078   /// set of sessions created by this factory.
00079   int add_session (ACE_QoS_Session *qos_session);
00080 
00081   /// Used by the destroy_session () to remove a session from the set
00082   /// of sessions created by this factory.
00083   int remove_session (ACE_QoS_Session *qos_session);
00084 
00085   /// Unordered set of QoS Sessions.
00086   typedef ACE_Unbounded_Set <ACE_QoS_Session *> QOS_SESSION_SET;
00087   QOS_SESSION_SET qos_session_set_;
00088 
00089 };
00090 
00091 #include "ace/post.h"
00092 #endif /* ACE_QOS_SESSION_FACTORY_H */

Generated on Mon Jun 16 13:17:26 2003 for ACE_QoS by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002