Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

ACE_Thread_Strategy Class Template Reference

Defines the interface for specifying a concurrency strategy for a <SVC_HANDLER> based on multithreading. More...

#include <Strategies_T.h>

Inheritance diagram for ACE_Thread_Strategy:

Inheritance graph
[legend]
Collaboration diagram for ACE_Thread_Strategy:

Collaboration graph
[legend]
List of all members.

Public Methods

 ACE_Thread_Strategy (int flags=0)
 "Do-nothing constructor". More...

 ACE_Thread_Strategy (ACE_Thread_Manager *tm, long thr_flags, int n_threads=1, int flags=0)
 Initialize the strategy. More...

virtual int open (ACE_Thread_Manager *tm, long thr_flags, int n_threads=1, int flags=0)
 Initialize the strategy. More...

virtual ~ACE_Thread_Strategy (void)
virtual int activate_svc_handler (SVC_HANDLER *svc_handler, void *arg=0)
 Activate the <svc_handler> with an appropriate concurrency strategy. More...

void dump (void) const
 Dump the state of an object. More...


Public Attributes

 ACE_ALLOC_HOOK_DECLARE
 Declare the dynamic allocation hooks. More...


Protected Types

typedef ACE_Concurrency_Strategy<
SVC_HANDLER > 
inherited

Protected Attributes

ACE_Thread_Managerthr_mgr_
 Thread manager for this class (must be provided). More...

long thr_flags_
 Flags to pass into the <SVC_HANDLER::activate> method. More...

int n_threads_
 Number of threads to spawn. More...


Detailed Description

template<class SVC_HANDLER>
class ACE_Thread_Strategy< SVC_HANDLER >

Defines the interface for specifying a concurrency strategy for a <SVC_HANDLER> based on multithreading.

This class provides a strategy that manages the creation of threads to handle requests from clients concurrently. It behaves as a "thread factory", spawning threads "on-demand" to run the service specified by a user-supplied <SVC_HANDLER>.


Member Typedef Documentation

template<class SVC_HANDLER>
typedef ACE_Concurrency_Strategy<SVC_HANDLER> ACE_Thread_Strategy::inherited [protected]
 


Constructor & Destructor Documentation

template<class SVC_HANDLER>
ASYS_INLINE ACE_Thread_Strategy< SVC_HANDLER >::ACE_Thread_Strategy int    flags = 0
 

"Do-nothing constructor".

template<class SVC_HANDLER>
ASYS_INLINE ACE_Thread_Strategy< SVC_HANDLER >::ACE_Thread_Strategy ACE_Thread_Manager   thr_mgr,
long    thr_flags,
int    n_threads = 1,
int    flags = 0
 

Initialize the strategy.

template<class SVC_HANDLER>
ASYS_INLINE ACE_Thread_Strategy< SVC_HANDLER >::~ACE_Thread_Strategy void    [virtual]
 


Member Function Documentation

template<class SVC_HANDLER>
int ACE_Thread_Strategy< SVC_HANDLER >::activate_svc_handler SVC_HANDLER *    svc_handler,
void *    arg = 0
[virtual]
 

Activate the <svc_handler> with an appropriate concurrency strategy.

This method activates the SVC_HANDLER by first calling its <open> method and then calling its <activate> method to turn it into an active object.

Reimplemented from ACE_Concurrency_Strategy.

template<class SVC_HANDLER>
void ACE_Thread_Strategy< SVC_HANDLER >::dump void    const
 

Dump the state of an object.

Reimplemented from ACE_Concurrency_Strategy.

template<class SVC_HANDLER>
int ACE_Thread_Strategy< SVC_HANDLER >::open ACE_Thread_Manager   thr_mgr,
long    thr_flags,
int    n_threads = 1,
int    flags = 0
[virtual]
 

Initialize the strategy.


Member Data Documentation

template<class SVC_HANDLER>
ACE_Thread_Strategy::ACE_ALLOC_HOOK_DECLARE
 

Declare the dynamic allocation hooks.

Reimplemented from ACE_Concurrency_Strategy.

template<class SVC_HANDLER>
int ACE_Thread_Strategy::n_threads_ [protected]
 

Number of threads to spawn.

template<class SVC_HANDLER>
long ACE_Thread_Strategy::thr_flags_ [protected]
 

Flags to pass into the <SVC_HANDLER::activate> method.

template<class SVC_HANDLER>
ACE_Thread_Manager* ACE_Thread_Strategy::thr_mgr_ [protected]
 

Thread manager for this class (must be provided).


The documentation for this class was generated from the following files:
Generated on Thu Oct 10 17:13:15 2002 for ACE by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001