OpenDDS
Snapshot(2023/04/28-20:55)
|
#include <EventDispatcher.h>
Public Member Functions | |
EventDispatcher () | |
virtual | ~EventDispatcher () |
virtual void | shutdown (bool immediate=false)=0 |
virtual bool | dispatch (EventBase_rch event)=0 |
virtual long | schedule (EventBase_rch event, const MonotonicTimePoint &expiration=MonotonicTimePoint::now())=0 |
virtual size_t | cancel (long id)=0 |
![]() | |
virtual | ~RcObject () |
virtual void | _add_ref () |
virtual void | _remove_ref () |
long | ref_count () const |
WeakObject * | _get_weak_object () const |
Additional Inherited Members | |
![]() | |
RcObject () | |
EventDispatcher is an interface for the scheduling and dispatching of events
Implementations of EventDispatcher will accept reference counted handles to event objects derived from EventBase either for immediate dispatch (dispatch) or for future scheduled dispatch (schedule). Scheduled dispatches return id values which can be used to cancel the dispatch before the scheduled time.
Definition at line 106 of file EventDispatcher.h.
OpenDDS::DCPS::EventDispatcher::EventDispatcher | ( | ) |
Definition at line 46 of file EventDispatcher.cpp.
|
virtual |
Definition at line 50 of file EventDispatcher.cpp.
References OPENDDS_END_VERSIONED_NAMESPACE_DECL.
|
pure virtual |
Cancel a scheduled event dispatch.
id | the id of the event timer to cancel |
Implemented in OpenDDS::DCPS::ServiceEventDispatcher.
Referenced by OpenDDS::DCPS::SporadicEvent::cancel(), OpenDDS::DCPS::PeriodicEvent::disable(), and OpenDDS::DCPS::SporadicEvent::schedule().
|
pure virtual |
Dispatch an event.
event | the event to dispatch |
Implemented in OpenDDS::DCPS::ServiceEventDispatcher.
Referenced by OpenDDS::RTPS::Sedp::cleanup_reader_association(), OpenDDS::RTPS::Sedp::cleanup_writer_association(), OpenDDS::DCPS::PeriodicEvent::enable(), OpenDDS::RTPS::Sedp::match_continue(), OpenDDS::DCPS::RtpsUdpDataLink::RtpsWriter::process_acknack(), OpenDDS::RTPS::Sedp::process_association_records_i(), and OpenDDS::DCPS::TransportImpl::release_link_resources().
|
pure virtual |
Schedule the future dispatch of an event.
event | the event to dispatch |
expiration | the requested dispatch time (no earlier than) |
Implemented in OpenDDS::DCPS::ServiceEventDispatcher.
Referenced by OpenDDS::DCPS::PeriodicEvent::enable(), OpenDDS::DCPS::PeriodicEvent::handle_event_scheduling(), and OpenDDS::DCPS::SporadicEvent::schedule().
|
pure virtual |
Request shutdown of this EventDispatcher, which prevents sucessful future calls to either dispatch or schedule and cancels all scheduled events.
immediate | prevent any further dispatches from event queue, otherwise allow current queue to empty |
Implemented in OpenDDS::DCPS::ServiceEventDispatcher.
Referenced by OpenDDS::DCPS::TransportImpl::shutdown(), and OpenDDS::DCPS::TransportImpl::~TransportImpl().