NAME
ACE_Creation_Strategy -
Defines the interface for specifying a creation strategy for
a SVC_HANDLER.
SYNOPSIS
#include <ace/ACE_Strategies.h >
template<class SVC_HANDLER>
class ACE_Creation_Strategy
{
public:
ACE_Creation_Strategy (ACE_Thread_Manager * = 0);
int open (ACE_Thread_Manager * = 0);
virtual ~ACE_Creation_Strategy (void);
virtual SVC_HANDLER *make_svc_handler (void);
void dump (void) const;
ACE_ALLOC_HOOK_DECLARE;
protected:
ACE_Thread_Manager *thr_mgr_;
};
DESCRIPTION
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.).
Initialization and termination methods.
ACE_Creation_Strategy (ACE_Thread_Manager * = 0);
int open (ACE_Thread_Manager * = 0);
A Thread_Manager is useful when creating active objects.
virtual ~ACE_Creation_Strategy (void);
Factory method.
virtual SVC_HANDLER *make_svc_handler (void);
Create a SVC_HANDLER with the appropriate creation strategy. The
default behavior of this method is to make a new SVC_HANDLER,
passing in the Thread_Manager (if any).
void dump (void) const;
Dump the state of an object.
ACE_ALLOC_HOOK_DECLARE;
Declare the dynamic allocation hooks.
AUTHOR
Doug Schmidt
LIBRARY
ace