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

Public Types | |
| typedef ACE_TYPENAME SVC_HANDLER::addr_type | addr_type |
| typedef SVC_HANDLER | handler_type |
| typedef ACE_TYPENAME SVC_HANDLER::stream_type | stream_type |
Public Methods | |
| ACE_Concurrency_Strategy (int flags=0) | |
| Constructor. More... | |
| virtual int | activate_svc_handler (SVC_HANDLER *svc_handler, void *arg=0) |
| virtual | ~ACE_Concurrency_Strategy (void) |
| void | dump (void) const |
| Dump the state of an object. More... | |
Public Attributes | |
| ACE_ALLOC_HOOK_DECLARE | |
| Declare the dynamic allocation hooks. More... | |
Protected Attributes | |
| int | flags_ |
| Flags that are parsed to set options for the connected <SVC_HANDLER>. More... | |
Default behavior is to activate the SVC_HANDLER by calling its <open> method (which allows the SVC_HANDLER to define its own concurrency strategy). However, subclasses can override this default strategy to do more sophisticated concurrency activations (such as creating the SVC_HANDLER as an active object via multi-threading or multi-processing).
Definition at line 248 of file Strategies_T.h.
|
|||||
|
Definition at line 253 of file Strategies_T.h. |
|
|||||
|
Definition at line 254 of file Strategies_T.h. |
|
|||||
|
Definition at line 255 of file Strategies_T.h. |
|
||||||||||
|
Constructor.
Definition at line 122 of file Strategies_T.i. References ACE_TRACE.
|
|
||||||||||
|
Definition at line 129 of file Strategies_T.i. References ACE_TRACE.
00130 {
00131 ACE_TRACE ("ACE_Concurrency_Strategy<SVC_HANDLER>::~ACE_Concurrency_Strategy");
00132 }
|
|
||||||||||||||||
|
Activate the <svc_handler> with an appropriate concurrency strategy. The default behavior of this method is to activate the SVC_HANDLER by calling its <open> method (which allows the SVC_HANDLER to define its own concurrency strategy). Reimplemented in ACE_Reactive_Strategy. Definition at line 128 of file Strategies_T.cpp. References ACE_BIT_ENABLED, ACE_NONBLOCK, and ACE_TRACE. Referenced by ACE_Strategy_Connector::activate_svc_handler.
00130 {
00131 ACE_TRACE ("ACE_Concurrency_Strategy<SVC_HANDLER>::activate_svc_handler");
00132
00133 int result = 0;
00134
00135 // See if we should enable non-blocking I/O on the <svc_handler>'s
00136 // peer.
00137 if (ACE_BIT_ENABLED (this->flags_, ACE_NONBLOCK) != 0)
00138 {
00139 if (svc_handler->peer ().enable (ACE_NONBLOCK) == -1)
00140 result = -1;
00141 }
00142 // Otherwise, make sure it's disabled by default.
00143 else if (svc_handler->peer ().disable (ACE_NONBLOCK) == -1)
00144 result = -1;
00145
00146 if (result == 0 && svc_handler->open (arg) == -1)
00147 result = -1;
00148
00149 if (result == -1)
00150 svc_handler->close (0);
00151
00152 return result;
00153 }
|
|
||||||||||
|
Dump the state of an object.
Reimplemented in ACE_Reactive_Strategy. Definition at line 1149 of file Strategies_T.cpp. References ACE_TRACE. Referenced by ACE_Strategy_Acceptor::dump.
01150 {
01151 ACE_TRACE ("ACE_Concurrency_Strategy<SVC_HANDLER>::dump");
01152 }
|
|
|||||
|
Declare the dynamic allocation hooks.
Reimplemented in ACE_Reactive_Strategy. Definition at line 276 of file Strategies_T.h. |
|
|||||
|
Flags that are parsed to set options for the connected <SVC_HANDLER>.
Definition at line 282 of file Strategies_T.h. Referenced by ACE_Process_Strategy::open, ACE_Thread_Strategy::open, and ACE_Reactive_Strategy::open. |
1.2.14 written by Dimitri van Heesch,
© 1997-2002