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

TAO_Concurrency_Strategy Class Template Reference

Activates the Svc_Handler, and then if specified by the TAO_Server_Strategy_Factory, it activates the Svc_Handler to run in its own thread. More...

#include <Acceptor_Impl.h>

Inheritance diagram for TAO_Concurrency_Strategy:

Inheritance graph
[legend]
Collaboration diagram for TAO_Concurrency_Strategy:

Collaboration graph
[legend]
List of all members.

Public Methods

 TAO_Concurrency_Strategy (TAO_ORB_Core *orb_core)
 Constructor. More...

int activate_svc_handler (SVC_HANDLER *svc_handler, void *arg)

Protected Attributes

TAO_ORB_Coreorb_core_
 Pointer to the ORB Core. More...


Detailed Description

template<class SVC_HANDLER>
class TAO_Concurrency_Strategy< SVC_HANDLER >

Activates the Svc_Handler, and then if specified by the TAO_Server_Strategy_Factory, it activates the Svc_Handler to run in its own thread.

Definition at line 69 of file Acceptor_Impl.h.


Constructor & Destructor Documentation

template<class SVC_HANDLER>
TAO_Concurrency_Strategy< SVC_HANDLER >::TAO_Concurrency_Strategy TAO_ORB_Core   orb_core
 

Constructor.

Definition at line 77 of file Acceptor_Impl.cpp.

00078   : orb_core_ (orb_core)
00079 {
00080 }


Member Function Documentation

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

Activates the Svc_Handler, and then if specified by the TAO_Server_Strategy_Factory, it activates the Svc_Handler to run in its own thread.

Reimplemented from ACE_Concurrency_Strategy.

Definition at line 83 of file Acceptor_Impl.cpp.

References ACE_ERROR, ACE_TEXT, TAO_Server_Strategy_Factory::activate_server_connections, ACE_Concurrency_Strategy::activate_svc_handler, LM_ERROR, orb_core_, TAO_Server_Strategy_Factory::server_connection_thread_count, TAO_Server_Strategy_Factory::server_connection_thread_flags, and TAO_ORB_Core::server_factory.

00085 {
00086   if (this->ACE_Concurrency_Strategy<SVC_HANDLER>::activate_svc_handler (sh,
00087                                                                          arg) == -1)
00088     return -1;
00089 
00090   // The service handler has been activated. Now cache the handler.
00091   if (sh->add_transport_to_cache () == -1)
00092     {
00093       ACE_ERROR ((LM_ERROR,
00094                   ACE_TEXT ("(%P|%t) Could not add the handler to Cache \n")));
00095     }
00096 
00097   TAO_Server_Strategy_Factory *f =
00098     this->orb_core_->server_factory ();
00099 
00100   // thread-per-connection concurrency model
00101 
00102   if (f->activate_server_connections ())
00103     return sh->activate (f->server_connection_thread_flags (),
00104                          f->server_connection_thread_count ());
00105 
00106   // reactive concurrency model. We may want to register ourselves
00107   // with the reactor. Call the register handler on the transport.
00108   return sh->transport ()->register_handler ();
00109 }


Member Data Documentation

template<class SVC_HANDLER>
TAO_ORB_Core* TAO_Concurrency_Strategy::orb_core_ [protected]
 

Pointer to the ORB Core.

Definition at line 85 of file Acceptor_Impl.h.

Referenced by activate_svc_handler.


The documentation for this class was generated from the following files:
Generated on Mon Jun 16 15:09:51 2003 for TAO by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002