handle_*
() methods run in the reactor's thread of control.
More...
#include <Strategies_T.h>
Inheritance diagram for ACE_Reactive_Strategy< SVC_HANDLER >:
Public Types | |
typedef ACE_Concurrency_Strategy< SVC_HANDLER > | base_type |
Public Member Functions | |
ACE_Reactive_Strategy (int flags=0) | |
"Do-nothing constructor" | |
ACE_Reactive_Strategy (ACE_Reactor *reactor, ACE_Reactor_Mask=ACE_Event_Handler::READ_MASK, int flags=0) | |
Initialize the strategy. | |
virtual int | open (ACE_Reactor *reactor, ACE_Reactor_Mask=ACE_Event_Handler::READ_MASK, int flags=0) |
Initialize the strategy. | |
virtual | ~ACE_Reactive_Strategy (void) |
Destructor. | |
virtual int | activate_svc_handler (SVC_HANDLER *svc_handler, void *arg=0) |
void | dump (void) const |
Dump the state of an object. | |
Public Attributes | |
ACE_ALLOC_HOOK_DECLARE | |
Declare the dynamic allocation hooks. | |
Protected Types | |
typedef ACE_Concurrency_Strategy< SVC_HANDLER > | inherited |
Protected Attributes | |
ACE_Reactor * | reactor_ |
Pointer to the Reactor we'll use to register the . | |
ACE_Reactor_Mask | mask_ |
handle_*
() methods run in the reactor's thread of control.
This class provides a strategy that registers the with a .
Definition at line 299 of file Strategies_T.h.
|
Definition at line 304 of file Strategies_T.h. |
|
Definition at line 336 of file Strategies_T.h. |
|
"Do-nothing constructor"
Definition at line 88 of file Strategies_T.inl. References ACE_TRACE.
00089 : ACE_Concurrency_Strategy<SVC_HANDLER> (flags), 00090 reactor_ (0), 00091 mask_ (ACE_Event_Handler::NULL_MASK) 00092 { 00093 ACE_TRACE ("ACE_Reactive_Strategy<SVC_HANDLER>::ACE_Reactive_Strategy"); 00094 } |
|
Initialize the strategy.
Definition at line 73 of file Strategies_T.inl. References ACE_ERROR, ACE_LIB_TEXT, ACE_Reactor_Mask, ACE_TRACE, LM_ERROR, and ACE_Reactive_Strategy< SVC_HANDLER >::open().
00076 { 00077 ACE_TRACE ("ACE_Reactive_Strategy<SVC_HANDLER>::ACE_Reactive_Strategy"); 00078 00079 if (this->open (reactor, 00080 mask, 00081 flags) == -1) 00082 ACE_ERROR ((LM_ERROR, 00083 ACE_LIB_TEXT ("%p\n"), 00084 ACE_LIB_TEXT ("ACE_Reactive_Strategy<SVC_HANDLER>::ACE_Reactive_Strategy"))); 00085 } |
|
Destructor.
Definition at line 1257 of file Strategies_T.cpp. References ACE_TRACE.
01258 { 01259 ACE_TRACE ("ACE_Reactive_Strategy<SVC_HANDLER>::~ACE_Reactive_Strategy"); 01260 } |
|
Activate the by registering it with the and then calling it's hook. Reimplemented from ACE_Concurrency_Strategy< SVC_HANDLER >. Definition at line 224 of file Strategies_T.cpp. References ACE_TRACE, ACE_Reactor::register_handler(), and ACE_Reactor::uses_event_associations().
00226 { 00227 ACE_TRACE ("ACE_Reactive_Strategy<SVC_HANDLER>::activate_svc_handler"); 00228 00229 int result = 0; 00230 00231 if (this->reactor_ == 0) 00232 result = -1; 00233 00234 // Register with the Reactor with the appropriate <mask>. 00235 else if (this->reactor_->register_handler (svc_handler, this->mask_) == -1) 00236 result = -1; 00237 00238 // If the implementation of the reactor uses event associations 00239 else if (this->reactor_->uses_event_associations ()) 00240 { 00241 // If we don't have non-block on, it won't work with 00242 // WFMO_Reactor 00243 // This maybe too harsh 00244 // if (!ACE_BIT_ENABLED (this->flags_, ACE_NONBLOCK)) 00245 // goto failure; 00246 if (svc_handler->open (arg) != -1) 00247 return 0; 00248 else 00249 result = -1; 00250 } 00251 else 00252 // Call up to our parent to do the SVC_HANDLER initialization. 00253 return this->inherited::activate_svc_handler (svc_handler, arg); 00254 00255 if (result == -1) 00256 svc_handler->close (0); 00257 00258 return result; 00259 } |
|
Dump the state of an object.
Reimplemented from ACE_Concurrency_Strategy< SVC_HANDLER >. Definition at line 1264 of file Strategies_T.cpp. References ACE_TRACE.
01265 { 01266 #if defined (ACE_HAS_DUMP) 01267 ACE_TRACE ("ACE_Reactive_Strategy<SVC_HANDLER>::dump"); 01268 #endif /* ACE_HAS_DUMP */ 01269 } |
|
Initialize the strategy.
Definition at line 207 of file Strategies_T.cpp. References ACE_Reactor_Mask, and ACE_TRACE. Referenced by ACE_Reactive_Strategy< SVC_HANDLER >::ACE_Reactive_Strategy().
|
|
Declare the dynamic allocation hooks.
Reimplemented from ACE_Concurrency_Strategy< SVC_HANDLER >. Definition at line 333 of file Strategies_T.h. |
|
The mask that we pass to the when we register the . Definition at line 343 of file Strategies_T.h. |
|
Pointer to the Reactor we'll use to register the .
Definition at line 339 of file Strategies_T.h. |