OpenDDS  Snapshot(2023/04/28-20:55)
ServiceEventDispatcher.h
Go to the documentation of this file.
1 /*
2  *
3  *
4  * Distributed under the OpenDDS License.
5  * See: http://www.opendds.org/license.html
6  */
7 
8 #ifndef OPENDDS_DCPS_SERVICE_EVENT_DISPATCHER_H
9 #define OPENDDS_DCPS_SERVICE_EVENT_DISPATCHER_H
10 
11 #include "EventDispatcher.h"
12 #include "DispatchService.h"
13 
15 
16 namespace OpenDDS {
17 namespace DCPS {
18 
20 public:
21  /**
22  * Create a ServiceEventDispatcher
23  * @param count the requested size of the internal thread pool (see DispatchService)
24  */
25  explicit ServiceEventDispatcher(size_t count = 1);
26  virtual ~ServiceEventDispatcher();
27 
28  void shutdown(bool immediate = false);
29 
30  bool dispatch(EventBase_rch event);
31 
32  long schedule(EventBase_rch event, const MonotonicTimePoint& expiration = MonotonicTimePoint::now());
33 
34  size_t cancel(long id);
35 
36 private:
37 
40 };
42 
43 } // DCPS
44 } // OpenDDS
45 
47 
48 #endif // OPENDDS_DCPS_SERVICE_EVENT_DISPATCHER_H
#define OpenDDS_Dcps_Export
Definition: dcps_export.h:24
static TimePoint_T< MonotonicClock > now()
Definition: TimePoint_T.inl:41
#define OPENDDS_END_VERSIONED_NAMESPACE_DECL
int shutdown(ACE_HANDLE handle, int how)
The Internal API and Implementation of OpenDDS.
Definition: AddressCache.h:28
RcHandle< ServiceEventDispatcher > ServiceEventDispatcher_rch