3 * @file Dispatcher_Impl.h
5 * @author Venkita Subramonian (venkita@cs.wustl.edu)
7 * Based on previous work by Tim Harrison (harrison@cs.wustl.edu),
8 * Chris Gill, Carlos O'Ryan and other members of the DOC group.
11 #ifndef DISPATCHER_IMPL_H
12 #define DISPATCHER_IMPL_H
13 #include /**/ "ace/pre.h"
15 #include "Kokyu_defs.h"
17 #if !defined (ACE_LACKS_PRAGMA_ONCE)
19 #endif /* ACE_LACKS_PRAGMA_ONCE */
21 #include "kokyu_export.h"
28 * @brief Base class for EC dispatcher implementations
30 * The responsibility of this class is to act as a common base class
31 * for different EC dispatcher implementations. This is an
32 * abstract base class and cannot be instantiated.
34 class Kokyu_Export Dispatcher_Impl
37 /// Configure the dispatcher.
38 int init (const Dispatcher_Attributes
&);
42 /// dispatch a command (eg. event) based on the QoS supplied.
43 int dispatch (const Dispatch_Command
*,
44 const QoSDescriptor
&);
46 /// shutdown the dispatcher.
49 virtual ~Dispatcher_Impl();
52 //following an idiom to avoid public virtual functions.
53 //instead make them private and use the template method
54 //pattern - "Virtually Yours" article in CUJ Experts Forum
56 virtual int init_i (const Dispatcher_Attributes
&) =0;
57 virtual int dispatch_i (const Dispatch_Command
*,
58 const QoSDescriptor
&) =0;
59 virtual int shutdown_i () =0;
60 virtual int activate_i () =0;
63 int thr_creation_flags_
;
67 #if defined (__ACE_INLINE__)
68 #include "Dispatcher_Impl.inl"
69 #endif /* __ACE_INLINE__ */
71 #include /**/ "ace/post.h"
72 #endif /* DISPATCHER_IMPL_H */