TAO_COIOP_Connection_Handler Class Reference

Handles requests on a single connection. More...

#include <COIOP_Connection_Handler.h>

Inheritance diagram for TAO_COIOP_Connection_Handler:

Inheritance graph
[legend]
Collaboration diagram for TAO_COIOP_Connection_Handler:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TAO_COIOP_Connection_Handler (ACE_Thread_Manager *t=0)
 TAO_COIOP_Connection_Handler (TAO_ORB_Core *orb_core)
 Constructor.

 ~TAO_COIOP_Connection_Handler (void)
 Destructor.

virtual int open (void *)
int close (u_long=0)
int add_transport_to_cache (void)
 Add ourselves to Cache.

virtual int open_handler (void *)
Event Handler overloads
virtual int resume_handler (void)
virtual int close_connection (void)
virtual int handle_input (ACE_HANDLE)
virtual int handle_output (ACE_HANDLE)
virtual int handle_close (ACE_HANDLE, ACE_Reactor_Mask)
virtual int handle_timeout (const ACE_Time_Value &current_time, const void *act=0)

Detailed Description

Handles requests on a single connection.

The Connection handler which is common for the Acceptor and the Connector

Definition at line 45 of file COIOP_Connection_Handler.h.


Constructor & Destructor Documentation

TAO_BEGIN_VERSIONED_NAMESPACE_DECL TAO_COIOP_Connection_Handler::TAO_COIOP_Connection_Handler ACE_Thread_Manager t = 0  ) 
 

Definition at line 27 of file COIOP_Connection_Handler.cpp.

References ACE_ASSERT, and TAO_COIOP_SVC_HANDLER.

00028   : TAO_COIOP_SVC_HANDLER (t, 0 , 0),
00029     TAO_Connection_Handler (0)
00030 {
00031   // This constructor should *never* get called, it is just here to
00032   // make the compiler happy: the default implementation of the
00033   // Creation_Strategy requires a constructor with that signature, we
00034   // don't use that implementation, but some (most?) compilers
00035   // instantiate it anyway.
00036   ACE_ASSERT (0);
00037 }

TAO_COIOP_Connection_Handler::TAO_COIOP_Connection_Handler TAO_ORB_Core orb_core  ) 
 

Constructor.

Definition at line 40 of file COIOP_Connection_Handler.cpp.

References ACE_NEW, TAO_COIOP_SVC_HANDLER, and TAO_Connection_Handler::transport().

00041   : TAO_COIOP_SVC_HANDLER (orb_core->thr_mgr (), 0, 0),
00042     TAO_Connection_Handler (orb_core)
00043 {
00044   TAO_COIOP_Transport* specific_transport = 0;
00045   ACE_NEW (specific_transport,
00046            TAO_COIOP_Transport(this, orb_core));
00047 
00048   // store this pointer (indirectly increment ref count)
00049   this->transport (specific_transport);
00050 }

TAO_COIOP_Connection_Handler::~TAO_COIOP_Connection_Handler void   ) 
 

Destructor.

Definition at line 53 of file COIOP_Connection_Handler.cpp.

References ACE_ERROR, ACE_TEXT, LM_ERROR, TAO_Connection_Handler::release_os_resources(), TAO_debug_level, and TAO_Connection_Handler::transport().

00054 {
00055   delete this->transport ();
00056 
00057   int const result =
00058     this->release_os_resources ();
00059 
00060   if (result == -1 && TAO_debug_level)
00061     {
00062       ACE_ERROR ((LM_ERROR,
00063                   ACE_TEXT("TAO (%P|%t) - COIOP_Connection_Handler::")
00064                   ACE_TEXT("~COIOP_Connection_Handler, ")
00065                   ACE_TEXT("release_os_resources() failed %m\n")));
00066     }
00067   delete this->transport ();
00068 }


Member Function Documentation

int TAO_COIOP_Connection_Handler::add_transport_to_cache void   ) 
 

Add ourselves to Cache.

int TAO_COIOP_Connection_Handler::close u_long  = 0  )  [virtual]
 

Close called by the Acceptor or Connector when connection establishment fails.

Reimplemented from ACE_Svc_Handler<, >.

Definition at line 138 of file COIOP_Connection_Handler.cpp.

References TAO_Connection_Handler::close_handler().

00139 {
00140   return this->close_handler ();
00141 }

int TAO_COIOP_Connection_Handler::close_connection void   )  [virtual]
 

Implements TAO_Connection_Handler.

Definition at line 89 of file COIOP_Connection_Handler.cpp.

References TAO_Connection_Handler::close_connection_eh().

Referenced by handle_output().

00090 {
00091   return this->close_connection_eh (this);
00092 }

int TAO_COIOP_Connection_Handler::handle_close ACE_HANDLE  ,
ACE_Reactor_Mask 
[virtual]
 

Reimplemented from ACE_Svc_Handler<, >.

Definition at line 126 of file COIOP_Connection_Handler.cpp.

00128 {
00129   // No asserts here since the handler is registered with the Reactor
00130   // and the handler ownership is given to the Reactor.  When the
00131   // Reactor closes, it will call handle_close() on the handler.  It
00132   // is however important to overwrite handle_close() to do nothing
00133   // since the base class does too much.
00134   return 0;
00135 }

int TAO_COIOP_Connection_Handler::handle_input ACE_HANDLE   )  [virtual]
 

Implements TAO_Connection_Handler.

Definition at line 95 of file COIOP_Connection_Handler.cpp.

References TAO_Connection_Handler::handle_input_eh().

00096 {
00097   return this->handle_input_eh (h, this);
00098 }

int TAO_COIOP_Connection_Handler::handle_output ACE_HANDLE   )  [virtual]
 

Reimplemented from ACE_Event_Handler.

Definition at line 101 of file COIOP_Connection_Handler.cpp.

References close_connection(), and TAO_Connection_Handler::handle_output_eh().

00102 {
00103   int const result =
00104     this->handle_output_eh (handle, this);
00105 
00106   if (result == -1)
00107     {
00108       this->close_connection ();
00109       return 0;
00110     }
00111 
00112   return result;
00113 }

int TAO_COIOP_Connection_Handler::handle_timeout const ACE_Time_Value current_time,
const void *  act = 0
[virtual]
 

Reimplemented from ACE_Svc_Handler<, >.

Definition at line 116 of file COIOP_Connection_Handler.cpp.

00118 {
00119   // We don't use this upcall from the Reactor.  However, we should
00120   // override this since the base class returns -1 which will result
00121   // in handle_close() getting called.
00122   return 0;
00123 }

int TAO_COIOP_Connection_Handler::open void *   )  [virtual]
 

Called by the when the handler is completely connected. Argument is unused.

Reimplemented from ACE_Svc_Handler<, >.

Definition at line 77 of file COIOP_Connection_Handler.cpp.

Referenced by open_handler().

00078 {
00079   return 0;
00080 }

int TAO_COIOP_Connection_Handler::open_handler void *   )  [virtual]
 

Connection_Handler overloads

Implements TAO_Connection_Handler.

Definition at line 71 of file COIOP_Connection_Handler.cpp.

References open().

00072 {
00073   return this->open (v);
00074 }

int TAO_COIOP_Connection_Handler::resume_handler void   )  [virtual]
 

Reimplemented from ACE_Event_Handler.

Definition at line 83 of file COIOP_Connection_Handler.cpp.


The documentation for this class was generated from the following files:
Generated on Sun Jan 27 16:02:18 2008 for TAO_Strategies by doxygen 1.3.6