TAO_Thread_Per_Connection_Handler Class Reference

Definition for the thread-per-connection strategy. More...

#include <Thread_Per_Connection_Handler.h>

Inheritance diagram for TAO_Thread_Per_Connection_Handler:

Inheritance graph
[legend]
Collaboration diagram for TAO_Thread_Per_Connection_Handler:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TAO_Thread_Per_Connection_Handler (TAO_Connection_Handler *ch, TAO_ORB_Core *oc)
 ~TAO_Thread_Per_Connection_Handler (void)
virtual int svc (void)
 Template hook method that the thread uses...
virtual int open (void *)
virtual int close (u_long)

Private Attributes

TAO_Connection_Handlerch_

Detailed Description

Definition for the thread-per-connection strategy.

This object acts as an active object, encapsulating the protocol specific handler which the active thread uses to process incoming messages.

Definition at line 44 of file Thread_Per_Connection_Handler.h.


Constructor & Destructor Documentation

TAO_BEGIN_VERSIONED_NAMESPACE_DECL TAO_Thread_Per_Connection_Handler::TAO_Thread_Per_Connection_Handler ( TAO_Connection_Handler ch,
TAO_ORB_Core oc 
)

Definition at line 15 of file Thread_Per_Connection_Handler.cpp.

00018   : ACE_Task_Base (oc->thr_mgr ())
00019   , ch_ (ch)
00020 {
00021   this->ch_->transport ()->add_reference ();
00022 }

TAO_Thread_Per_Connection_Handler::~TAO_Thread_Per_Connection_Handler ( void   ) 

Definition at line 24 of file Thread_Per_Connection_Handler.cpp.

References ch_, TAO_Connection_Handler::close_connection(), TAO_Transport::remove_reference(), and TAO_Connection_Handler::transport().

00025 {
00026   this->ch_->close_connection ();
00027   this->ch_->transport ()->remove_reference ();
00028 }


Member Function Documentation

int TAO_Thread_Per_Connection_Handler::close ( u_long   )  [virtual]

Reimplemented from ACE_Task_Base.

Definition at line 47 of file Thread_Per_Connection_Handler.cpp.

00048 {
00049   delete this;
00050 
00051   return 0;
00052 }

int TAO_Thread_Per_Connection_Handler::open ( void *   )  [virtual]

Reimplemented from ACE_Task_Base.

Definition at line 41 of file Thread_Per_Connection_Handler.cpp.

References ch_, and TAO_Connection_Handler::open_handler().

00042 {
00043   return this->ch_->open_handler (v);
00044 }

int TAO_Thread_Per_Connection_Handler::svc ( void   )  [virtual]

Template hook method that the thread uses...

Please see the documentation in ace/Task.h for details.

Reimplemented from ACE_Task_Base.

Definition at line 31 of file Thread_Per_Connection_Handler.cpp.

References ACE_NONBLOCK, ch_, ACE::clr_flags(), and TAO_Connection_Handler::svc_i().

00032 {
00033   ACE::clr_flags (this->ch_->transport ()->event_handler_i ()->get_handle (),
00034                   ACE_NONBLOCK);
00035 
00036   // Call the implementation here
00037   return this->ch_->svc_i ();
00038 }


Member Data Documentation

TAO_Connection_Handler* TAO_Thread_Per_Connection_Handler::ch_ [private]

Pointer to protocsol specific code that does the bunch of the job.

Definition at line 63 of file Thread_Per_Connection_Handler.h.

Referenced by open(), svc(), and ~TAO_Thread_Per_Connection_Handler().


The documentation for this class was generated from the following files:
Generated on Tue Feb 2 17:39:48 2010 for TAO by  doxygen 1.4.7