#include <Strategies_T.h>
Inheritance diagram for ACE_Reactive_Strategy:


Public Types | |
| typedef ACE_Concurrency_Strategy< SVC_HANDLER > | base_type |
Public Methods | |
| ACE_Reactive_Strategy (int flags=0) | |
| "Do-nothing constructor". More... | |
| ACE_Reactive_Strategy (ACE_Reactor *reactor, ACE_Reactor_Mask=ACE_Event_Handler::READ_MASK, int flags=0) | |
| Initialize the strategy. More... | |
| virtual int | open (ACE_Reactor *reactor, ACE_Reactor_Mask=ACE_Event_Handler::READ_MASK, int flags=0) |
| Initialize the strategy. More... | |
| virtual | ~ACE_Reactive_Strategy (void) |
| Destructor. More... | |
| virtual int | activate_svc_handler (SVC_HANDLER *svc_handler, void *arg=0) |
| Activate the <svc_handler> by registering it with the <Reactor> and then calling it's <open> hook. More... | |
| void | dump (void) const |
| Dump the state of an object. More... | |
Public Attributes | |
| ACE_ALLOC_HOOK_DECLARE | |
| Declare the dynamic allocation hooks. More... | |
Protected Types | |
| typedef ACE_Concurrency_Strategy< SVC_HANDLER > | inherited |
Protected Attributes | |
| ACE_Reactor * | reactor_ |
| Pointer to the Reactor we'll use to register the <SVC_HANDLER>. More... | |
| ACE_Reactor_Mask | mask_ |
| The mask that we pass to the <Reactor> when we register the <SVC_HANDLER>. More... | |
This class provides a strategy that registers the <SVC_HANDLER> with a <Reactor>.
Definition at line 295 of file Strategies_T.h.
|
|||||
|
Definition at line 300 of file Strategies_T.h. |
|
|||||
|
Definition at line 332 of file Strategies_T.h. |
|
||||||||||
|
"Do-nothing constructor".
Definition at line 150 of file Strategies_T.i. References ACE_TRACE.
00151 : ACE_Concurrency_Strategy<SVC_HANDLER> (flags), 00152 reactor_ (0), 00153 mask_ (ACE_Event_Handler::NULL_MASK) 00154 { 00155 ACE_TRACE ("ACE_Reactive_Strategy<SVC_HANDLER>::ACE_Reactive_Strategy"); 00156 } |
|
||||||||||||||||||||
|
Initialize the strategy.
Definition at line 135 of file Strategies_T.i. References ACE_ERROR, ACE_LIB_TEXT, ACE_Reactor_Mask, ACE_TRACE, LM_ERROR, and open.
00138 {
00139 ACE_TRACE ("ACE_Reactive_Strategy<SVC_HANDLER>::ACE_Reactive_Strategy");
00140
00141 if (this->open (reactor,
00142 mask,
00143 flags) == -1)
00144 ACE_ERROR ((LM_ERROR,
00145 ACE_LIB_TEXT ("%p\n"),
00146 ACE_LIB_TEXT ("ACE_Reactive_Strategy<SVC_HANDLER>::ACE_Reactive_Strategy")));
00147 }
|
|
||||||||||
|
Destructor.
Definition at line 159 of file Strategies_T.i. References ACE_TRACE.
00160 {
00161 ACE_TRACE ("ACE_Reactive_Strategy<SVC_HANDLER>::~ACE_Reactive_Strategy");
00162 }
|
|
||||||||||||||||
|
Activate the <svc_handler> by registering it with the <Reactor> and then calling it's <open> hook.
Reimplemented from ACE_Concurrency_Strategy. Definition at line 173 of file Strategies_T.cpp. References ACE_TRACE, reactor_, ACE_Reactor::register_handler, and ACE_Reactor::uses_event_associations.
00175 {
00176 ACE_TRACE ("ACE_Reactive_Strategy<SVC_HANDLER>::activate_svc_handler");
00177
00178 int result = 0;
00179
00180 if (this->reactor_ == 0)
00181 result = -1;
00182
00183 // Register with the Reactor with the appropriate <mask>.
00184 else if (this->reactor_->register_handler (svc_handler, this->mask_) == -1)
00185 result = -1;
00186
00187 // If the implementation of the reactor uses event associations
00188 else if (this->reactor_->uses_event_associations ())
00189 {
00190 // If we don't have non-block on, it won't work with
00191 // WFMO_Reactor
00192 // This maybe too harsh
00193 // if (!ACE_BIT_ENABLED (this->flags_, ACE_NONBLOCK))
00194 // goto failure;
00195 if (svc_handler->open (arg) != -1)
00196 return 0;
00197 else
00198 result = -1;
00199 }
00200 else
00201 // Call up to our parent to do the SVC_HANDLER initialization.
00202 return this->inherited::activate_svc_handler (svc_handler, arg);
00203
00204 if (result == -1)
00205 svc_handler->close (0);
00206
00207 return result;
00208 }
|
|
||||||||||
|
Dump the state of an object.
Reimplemented from ACE_Concurrency_Strategy. Definition at line 1155 of file Strategies_T.cpp. References ACE_TRACE.
01156 {
01157 ACE_TRACE ("ACE_Reactive_Strategy<SVC_HANDLER>::dump");
01158 }
|
|
||||||||||||||||||||
|
Initialize the strategy.
Definition at line 156 of file Strategies_T.cpp. References ACE_Reactor_Mask, ACE_TRACE, ACE_Concurrency_Strategy::flags_, mask_, and reactor_. Referenced by ACE_Reactive_Strategy.
|
|
|||||
|
Declare the dynamic allocation hooks.
Reimplemented from ACE_Concurrency_Strategy. Definition at line 329 of file Strategies_T.h. |
|
|||||
|
The mask that we pass to the <Reactor> when we register the <SVC_HANDLER>.
Definition at line 339 of file Strategies_T.h. Referenced by open. |
|
|||||
|
Pointer to the Reactor we'll use to register the <SVC_HANDLER>.
Definition at line 335 of file Strategies_T.h. Referenced by activate_svc_handler, and open. |
1.2.14 written by Dimitri van Heesch,
© 1997-2002