#include <Strategies_T.h>
Inheritance diagram for ACE_Creation_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_Creation_Strategy (ACE_Thread_Manager *=0, ACE_Reactor *=ACE_Reactor::instance()) | |
| Default constructor. More... | |
| int | open (ACE_Thread_Manager *=0, ACE_Reactor *=ACE_Reactor::instance()) |
| An ACE_Thread_Manager is useful when creating active objects and the ACE_Reactor is used to initialize the service handler's reactor. More... | |
| virtual | ~ACE_Creation_Strategy (void) |
| virtual int | make_svc_handler (SVC_HANDLER *&sh) |
| 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 | |
| ACE_Thread_Manager * | thr_mgr_ |
| Pointer to a thread manager. More... | |
| ACE_Reactor * | reactor_ |
| Pointer to an ACE_Reactor. More... | |
The default behavior is to make a new SVC_HANDLER. However, subclasses can override this strategy to perform SVC_HANDLER creation in any way that they like (such as creating subclass instances of SVC_HANDLER, using a singleton, dynamically linking the handler, etc.).
Definition at line 81 of file Strategies_T.h.
|
|||||
|
Definition at line 86 of file Strategies_T.h. |
|
|||||
|
Definition at line 87 of file Strategies_T.h. |
|
|||||
|
Definition at line 88 of file Strategies_T.h. |
|
||||||||||||||||
|
Default constructor.
Definition at line 67 of file Strategies_T.i. References ACE_ERROR, ACE_LIB_TEXT, ACE_TRACE, LM_ERROR, and open.
00069 {
00070 ACE_TRACE ("ACE_Creation_Strategy<SVC_HANDLER>::ACE_Creation_Strategy");
00071 if (this->open (thr_mgr, reactor) == -1)
00072 ACE_ERROR ((LM_ERROR,
00073 ACE_LIB_TEXT ("%p\n"),
00074 ACE_LIB_TEXT ("ACE_Creation_Strategy")));
00075 }
|
|
||||||||||
|
Definition at line 92 of file Strategies_T.i. References ACE_TRACE.
00093 {
00094 ACE_TRACE ("ACE_Creation_Strategy<SVC_HANDLER>::~ACE_Creation_Strategy");
00095 }
|
|
||||||||||
|
Dump the state of an object.
Reimplemented in ACE_Singleton_Strategy. Definition at line 1216 of file Strategies_T.cpp. References ACE_TRACE. Referenced by ACE_Strategy_Acceptor::dump.
01217 {
01218 ACE_TRACE ("ACE_Creation_Strategy<SVC_HANDLER>::dump");
01219 }
|
|
||||||||||
|
Create a SVC_HANDLER with the appropriate creation strategy. The default behavior of this method is to make a new <SVC_HANDLER> if <sh> == 0 (passing in the <Thread_Manager>), else <sh> is unchanged. Returns -1 on failure, else 0. Reimplemented in ACE_Singleton_Strategy. Definition at line 81 of file Strategies_T.i. References ACE_NEW_RETURN, and ACE_TRACE. Referenced by ACE_Strategy_Connector::make_svc_handler, and ACE_Strategy_Acceptor::make_svc_handler.
00082 {
00083 ACE_TRACE ("ACE_Creation_Strategy<SVC_HANDLER>::make_svc_handler");
00084
00085 if (sh == 0)
00086 ACE_NEW_RETURN (sh, SVC_HANDLER (this->thr_mgr_), -1);
00087 sh->reactor (this->reactor_);
00088 return 0;
00089 }
|
|
||||||||||||||||
|
An ACE_Thread_Manager is useful when creating active objects and the ACE_Reactor is used to initialize the service handler's reactor.
Definition at line 57 of file Strategies_T.i. References ACE_TRACE, reactor_, and thr_mgr_. Referenced by ACE_Creation_Strategy.
|
|
|||||
|
Declare the dynamic allocation hooks.
Reimplemented in ACE_Singleton_Strategy. Definition at line 116 of file Strategies_T.h. |
|
|||||
|
Pointer to an ACE_Reactor.
Definition at line 123 of file Strategies_T.h. Referenced by open. |
|
|||||
|
Pointer to a thread manager.
Definition at line 120 of file Strategies_T.h. Referenced by open. |
1.2.14 written by Dimitri van Heesch,
© 1997-2002