OpenDDS  Snapshot(2023/04/28-20:55)
ScheduleOutputHandler.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_TRANSPORT_FRAMEWORK_SCHEDULEOUTPUTHANDLER_H
9 #define OPENDDS_DCPS_TRANSPORT_FRAMEWORK_SCHEDULEOUTPUTHANDLER_H
10 
11 #include <ace/Reactor.h>
12 #include <ace/Event_Handler.h>
14 
16 
17 namespace OpenDDS { namespace DCPS {
18 
19 class TransportSendStrategy;
20 
21 /**
22  * @class ScheduleOutputHandler
23  *
24  * @brief event handler used to enable and disable output processing.
25  *
26  * This class implements a simple notification handler that is used to
27  * schedule or cancel output processing for queued data according to the
28  * current mode state of the TransportSendStrategy. If the send strategy
29  * is queueing data, then the reactor is enabled to process on output
30  * events. Otherwise the output processing callbacks are cancelled.
31  */
33  public:
34  /// Construct with the reactor and strategy.
37 
38  /// @{ @name ACE_Event_Handler methods
39 
40  /// modify the reactor mask for the handle.
41  virtual int handle_exception( ACE_HANDLE);
42 
43  /// @}
44 
45  /// Update output processing in the reactor.
46  void schedule_output();
47 
48  private:
49  /// Strategy sending data to be scheduled (or not).
51 
52  /// Cache the state that we have set the reactor into.
55 };
56 
57 }} // End of namespace OpenDDS::DCPS
58 
60 
61 #if defined (__ACE_INLINE__)
63 #endif /* __ACE_INLINE__ */
64 
65 #endif /* OPENDDS_SCHEDULEOUTPUTHANDER_H */
virtual int handle_exception(ACE_HANDLE)
modify the reactor mask for the handle.
ScheduleOutputHandler(TransportSendStrategy *strategy, ACE_Reactor *reactor)
Construct with the reactor and strategy.
void schedule_output()
Update output processing in the reactor.
virtual ACE_Reactor * reactor(void) const
#define OPENDDS_END_VERSIONED_NAMESPACE_DECL
event handler used to enable and disable output processing.
The Internal API and Implementation of OpenDDS.
Definition: AddressCache.h:28
HandlerState
Cache the state that we have set the reactor into.
TransportSendStrategy * strategy_
Strategy sending data to be scheduled (or not).