ACE  6.0.6
Public Types | Public Member Functions | Public Attributes | Protected Attributes
ACE_Creation_Strategy Class Reference

Defines the interface for specifying a creation strategy for a SVC_HANDLER. More...

#include <Strategies_T.h>

Collaboration diagram for ACE_Creation_Strategy:
Collaboration graph

List of all members.

Public Types

typedef SVC_HANDLER::addr_type addr_type
typedef SVC_HANDLER handler_type
typedef SVC_HANDLER::stream_type stream_type

Public Member Functions

 ACE_Creation_Strategy (ACE_Thread_Manager *=0, ACE_Reactor *=ACE_Reactor::instance())
 Default constructor.
int open (ACE_Thread_Manager *=0, ACE_Reactor *=ACE_Reactor::instance())
virtual ~ACE_Creation_Strategy (void)
virtual int make_svc_handler (SVC_HANDLER *&sh)
void dump (void) const
 Dump the state of an object.

Public Attributes

 Declare the dynamic allocation hooks.

Protected Attributes

 Pointer to a thread manager.
 Pointer to an ACE_Reactor.

Detailed Description

Defines the interface for specifying a creation strategy for a SVC_HANDLER.

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.).

Member Typedef Documentation

typedef SVC_HANDLER::addr_type ACE_Creation_Strategy::addr_type
typedef SVC_HANDLER::stream_type ACE_Creation_Strategy::stream_type

Constructor & Destructor Documentation

ACE_Creation_Strategy::ACE_Creation_Strategy ( ACE_Thread_Manager = 0,
ACE_Reactor = ACE_Reactor::instance() 

Default constructor.

virtual ACE_Creation_Strategy::~ACE_Creation_Strategy ( void  ) [virtual]

Member Function Documentation

void ACE_Creation_Strategy::dump ( void  ) const

Dump the state of an object.

Reimplemented in ACE_DLL_Strategy, and ACE_Singleton_Strategy.

virtual int ACE_Creation_Strategy::make_svc_handler ( SVC_HANDLER *&  sh) [virtual]

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_NOOP_Creation_Strategy, ACE_DLL_Strategy, and ACE_Singleton_Strategy.

int ACE_Creation_Strategy::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.

Member Data Documentation

Declare the dynamic allocation hooks.

Reimplemented in ACE_DLL_Strategy, and ACE_Singleton_Strategy.

Pointer to an ACE_Reactor.

Pointer to a thread manager.

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines