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

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 Member Functions | |
| ACE_Concurrency_Strategy (int flags=0) | |
| Constructor. | |
| 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. | |
Public Attributes | |
| ACE_ALLOC_HOOK_DECLARE | |
| Declare the dynamic allocation hooks. | |
Protected Attributes | |
| int | flags_ |
Default behavior is to activate the SVC_HANDLER by calling its 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 251 of file Strategies_T.h.
|
|||||
|
Definition at line 256 of file Strategies_T.h. |
|
|||||
|
Definition at line 257 of file Strategies_T.h. |
|
|||||
|
Definition at line 258 of file Strategies_T.h. |
|
||||||||||
|
Constructor.
Definition at line 66 of file Strategies_T.inl. References ACE_TRACE.
|
|
||||||||||
|
Definition at line 1242 of file Strategies_T.cpp. References ACE_TRACE.
01243 {
01244 ACE_TRACE ("ACE_Concurrency_Strategy<SVC_HANDLER>::~ACE_Concurrency_Strategy");
01245 }
|
|
||||||||||||||||
|
Activate the with an appropriate concurrency strategy. The default behavior of this method is to activate the SVC_HANDLER by calling its method (which allows the SVC_HANDLER to define its own concurrency strategy). Reimplemented in ACE_Reactive_Strategy< SVC_HANDLER >, ACE_Thread_Strategy< SVC_HANDLER >, ACE_Process_Strategy< SVC_HANDLER >, and ACE_NOOP_Concurrency_Strategy< SVC_HANDLER >. Definition at line 179 of file Strategies_T.cpp. References ACE_BIT_ENABLED, ACE_NONBLOCK, and ACE_TRACE.
00181 {
00182 ACE_TRACE ("ACE_Concurrency_Strategy<SVC_HANDLER>::activate_svc_handler");
00183
00184 int result = 0;
00185
00186 // See if we should enable non-blocking I/O on the <svc_handler>'s
00187 // peer.
00188 if (ACE_BIT_ENABLED (this->flags_, ACE_NONBLOCK) != 0)
00189 {
00190 if (svc_handler->peer ().enable (ACE_NONBLOCK) == -1)
00191 result = -1;
00192 }
00193 // Otherwise, make sure it's disabled by default.
00194 else if (svc_handler->peer ().disable (ACE_NONBLOCK) == -1)
00195 result = -1;
00196
00197 if (result == 0 && svc_handler->open (arg) == -1)
00198 result = -1;
00199
00200 if (result == -1)
00201 svc_handler->close (0);
00202
00203 return result;
00204 }
|
|
||||||||||
|
Dump the state of an object.
Reimplemented in ACE_Reactive_Strategy< SVC_HANDLER >, ACE_Thread_Strategy< SVC_HANDLER >, and ACE_Process_Strategy< SVC_HANDLER >. Definition at line 1249 of file Strategies_T.cpp. References ACE_TRACE. Referenced by ACE_Strategy_Acceptor< SVC_HANDLER, >::dump().
01250 {
01251 #if defined (ACE_HAS_DUMP)
01252 ACE_TRACE ("ACE_Concurrency_Strategy<SVC_HANDLER>::dump");
01253 #endif /* ACE_HAS_DUMP */
01254 }
|
|
|||||
|
Declare the dynamic allocation hooks.
Reimplemented in ACE_Reactive_Strategy< SVC_HANDLER >, ACE_Thread_Strategy< SVC_HANDLER >, and ACE_Process_Strategy< SVC_HANDLER >. Definition at line 279 of file Strategies_T.h. |
|
|||||
|
Flags that are parsed to set options for the connected . Definition at line 285 of file Strategies_T.h. |
1.3.6