ACE
6.3.3
|
Defines the interface for specifying a concurrency strategy for a SVC_HANDLER
based on multiprocessing.
More...
#include <Strategies_T.h>
Public Types | |
typedef ACE_Concurrency_Strategy< SVC_HANDLER > | base_type |
Public Types inherited from ACE_Concurrency_Strategy< SVC_HANDLER > | |
typedef SVC_HANDLER::addr_type | addr_type |
typedef SVC_HANDLER | handler_type |
typedef SVC_HANDLER::stream_type | stream_type |
Public Member Functions | |
ACE_Process_Strategy (size_t n_processes=1, ACE_Event_Handler *acceptor=0, ACE_Reactor *=0, int avoid_zombies=0) | |
virtual int | open (size_t n_processes=1, ACE_Event_Handler *acceptor=0, ACE_Reactor *=0, int avoid_zombies=0) |
virtual | ~ACE_Process_Strategy (void) |
virtual int | activate_svc_handler (SVC_HANDLER *svc_handler, void *arg=0) |
void | dump (void) const |
Dump the state of an object. More... | |
Public Member Functions inherited from ACE_Concurrency_Strategy< SVC_HANDLER > | |
ACE_Concurrency_Strategy (int flags=0) | |
Constructor. More... | |
virtual | ~ACE_Concurrency_Strategy (void) |
void | dump (void) const |
Dump the state of an object. More... | |
Public Attributes | |
ACE_ALLOC_HOOK_DECLARE | |
Declare the dynamic allocation hooks. More... | |
Public Attributes inherited from ACE_Concurrency_Strategy< SVC_HANDLER > | |
ACE_ALLOC_HOOK_DECLARE | |
Declare the dynamic allocation hooks. More... | |
Protected Types | |
typedef ACE_Concurrency_Strategy< SVC_HANDLER > | inherited |
Protected Attributes | |
size_t | n_processes_ |
Number of processes to spawn. More... | |
ACE_Event_Handler * | acceptor_ |
ACE_Reactor * | reactor_ |
Protected Attributes inherited from ACE_Concurrency_Strategy< SVC_HANDLER > | |
int | flags_ |
Defines the interface for specifying a concurrency strategy for a SVC_HANDLER
based on multiprocessing.
This class provides a strategy that manages the creation of processes to handle requests from clients concurrently using a process-per-connection model. It behaves as a "process factory", using ACE::fork()
to fork threads "on-demand" to run the service specified by a user-supplied SVC_HANDLER
in a separate process.
typedef ACE_Concurrency_Strategy<SVC_HANDLER> ACE_Process_Strategy< SVC_HANDLER >::base_type |
|
protected |
|
inline |
Initialize the strategy. If avoid_zombies is non-0 then set a flag to ACE::fork() to avoid zombies.
|
virtual |
|
virtual |
Activate the svc_handler with an appropriate concurrency strategy. This method activates the SVC_HANDLER by first forking and then calling the open()
method of the SVC_HANDLER in the child.
Reimplemented from ACE_Concurrency_Strategy< SVC_HANDLER >.
void ACE_Process_Strategy< SVC_HANDLER >::dump | ( | void | ) | const |
Dump the state of an object.
|
virtual |
Initialize the strategy. If avoid_zombies is non-0 then set a flag to ACE::fork() to avoid zombies.
|
protected |
This is the Acceptor
in the parent is listening on. We need to make sure that we remove it from the Reactor and close it down in the child.
ACE_Process_Strategy< SVC_HANDLER >::ACE_ALLOC_HOOK_DECLARE |
Declare the dynamic allocation hooks.
|
protected |
Number of processes to spawn.
|
protected |
This is the reactor the child is using in conjunction with the acceptor. We need to remove the acceptor from this reactor in the child.