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

TAO_Connection_Handler Class Reference

TAO_Connection_Handler. More...

#include <Connection_Handler.h>

Inheritance diagram for TAO_Connection_Handler:

Inheritance graph
[legend]
Collaboration diagram for TAO_Connection_Handler:

Collaboration graph
[legend]
List of all members.

Public Methods

 TAO_Connection_Handler (void)
 Constructor. More...

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

virtual ~TAO_Connection_Handler (void)
 Destructor. More...

TAO_Transporttransport (void)
 Return the underlying transport object. More...

void transport (TAO_Transport *transport)
 Set the underlying transport object. More...

int is_connect_complete (void) const
 Did the process of non-blocking connection initialization complete? More...

int is_connect_successful (void) const
 Was the non-blocking connection initialization successful? More...

int incr_refcount (void)
 Increment and decrement the refcount. The object is deleted when the refcount reaches zero. More...

void decr_refcount (void)
virtual int handle_input (ACE_HANDLE fd)=0
 The event handler calls, here so that other objects who hold a reference to this object can call the event handler methods. More...


Protected Methods

TAO_ORB_Coreorb_core (void)
 Return our TAO_ORB_Core pointer. More...

TAO_ORB_Core_TSS_Resourcestss_resources (void)
 Return our TSS Resources pointer. More...

int set_socket_option (ACE_SOCK &sock, int snd_size, int rcv_size)
 Set options on the socket. More...

int svc_i (void)
 This method is invoked from the svc () method of the Svc_Handler Object. More...

int incr_pending_upcalls (void)
 Increment and decrement the number of upcalls that have gone through this handler. Returns the upcall count. The calls are thread safe.. More...

int decr_pending_upcalls (void)
int pending_upcalls (void) const
 Query the upcall count. More...

virtual void handle_close_i (void)=0
 Shutdown the object. More...

Helper methods for Event_Handler-based derived classes.
Many (actually all so far) implementations of TAO_Connection_Handler are a mixin of TAO_Connection_Handler and some form of ACE_Event_Handler.

The following methods simplify such implementations by capturing the common code in a single place.

virtual int handle_close_eh (ACE_HANDLE h, unsigned long reactor_mask, ACE_Event_Handler *eh)
 Implement the handle_close() callback. More...

void handle_close_i_eh (ACE_Event_Handler *eh)
 Implement the handle_close_i() template method. More...

int handle_output_eh (ACE_HANDLE h, ACE_Event_Handler *eh)
 Implement the handle_output() callback. More...

int handle_input_eh (ACE_HANDLE h, ACE_Event_Handler *eh)
 Implement the handle_input() callback. More...

virtual int release_os_resources (void)
 Release the OS resources related to this handler, used in handle_close_eh(). More...

virtual void pre_io_hook (int &return_value)
 See the SSLIOP protocol for an interesting use-case. More...

virtual void pos_io_hook (int &return_value)
 See the SSLIOP protocol for an interesting use-case. More...


Private Attributes

TAO_ORB_Coreorb_core_
 Pointer to the TAO_ORB_Core. More...

TAO_Transporttransport_
 Transport object reference. More...

TAO_ORB_Core_TSS_Resourcestss_resources_
 Cached tss resources of the ORB that activated this object. More...

long pending_upcalls_
 Count nested upcalls on this svc_handler i.e., the connection can close during nested upcalls, you should not delete the svc_handler until the stack unwinds from the nested upcalls. More...

long reference_count_
ACE_Lockpending_upcall_lock_
 Lock for the <pending_upcalls_>. We can have more than one thread trying to access. More...


Detailed Description

TAO_Connection_Handler.

This class is an abstraction for the connection handlers. The connections handler in every protocol can derive from this class as well as the ACE_Svc_Handler specialised for the right protocol. This way, most of the common code for the different protocols would be in this implementation.


Constructor & Destructor Documentation

ACE_INLINE TAO_Connection_Handler::TAO_Connection_Handler void   
 

Constructor.

TAO_Connection_Handler::TAO_Connection_Handler TAO_ORB_Core   orb_core
 

Constructor.

TAO_Connection_Handler::~TAO_Connection_Handler void    [virtual]
 

Destructor.


Member Function Documentation

int TAO_Connection_Handler::decr_pending_upcalls void    [protected]
 

void TAO_Connection_Handler::decr_refcount void   
 

int TAO_Connection_Handler::handle_close_eh ACE_HANDLE    handle,
unsigned long    reactor_mask,
ACE_Event_Handler   eh
[protected, virtual]
 

Implement the handle_close() callback.

virtual void TAO_Connection_Handler::handle_close_i void    [protected, pure virtual]
 

Shutdown the object.

Reimplemented in TAO_IIOP_Connection_Handler.

void TAO_Connection_Handler::handle_close_i_eh ACE_Event_Handler   eh [protected]
 

Implement the handle_close_i() template method.

virtual int TAO_Connection_Handler::handle_input ACE_HANDLE    h [pure virtual]
 

The event handler calls, here so that other objects who hold a reference to this object can call the event handler methods.

Reimplemented in TAO_IIOP_Connection_Handler.

int TAO_Connection_Handler::handle_input_eh ACE_HANDLE    h,
ACE_Event_Handler   eh
[protected]
 

Implement the handle_input() callback.

int TAO_Connection_Handler::handle_output_eh ACE_HANDLE    h,
ACE_Event_Handler   eh
[protected]
 

Implement the handle_output() callback.

int TAO_Connection_Handler::incr_pending_upcalls void    [protected]
 

Increment and decrement the number of upcalls that have gone through this handler. Returns the upcall count. The calls are thread safe..

int TAO_Connection_Handler::incr_refcount void   
 

Increment and decrement the refcount. The object is deleted when the refcount reaches zero.

ACE_INLINE int TAO_Connection_Handler::is_connect_complete void    const
 

Did the process of non-blocking connection initialization complete?

ACE_INLINE int TAO_Connection_Handler::is_connect_successful void    const
 

Was the non-blocking connection initialization successful?

ACE_INLINE TAO_ORB_Core * TAO_Connection_Handler::orb_core void    [protected]
 

Return our TAO_ORB_Core pointer.

ACE_INLINE int TAO_Connection_Handler::pending_upcalls void    const [protected]
 

Query the upcall count.

void TAO_Connection_Handler::pos_io_hook int &    return_value [protected, virtual]
 

See the SSLIOP protocol for an interesting use-case.

void TAO_Connection_Handler::pre_io_hook int &    return_value [protected, virtual]
 

See the SSLIOP protocol for an interesting use-case.

int TAO_Connection_Handler::release_os_resources void    [protected, virtual]
 

Release the OS resources related to this handler, used in handle_close_eh().

Reimplemented in TAO_IIOP_Connection_Handler.

int TAO_Connection_Handler::set_socket_option ACE_SOCK   sock,
int    snd_size,
int    rcv_size
[protected]
 

Set options on the socket.

int TAO_Connection_Handler::svc_i void    [protected]
 

This method is invoked from the svc () method of the Svc_Handler Object.

void TAO_Connection_Handler::transport TAO_Transport   transport
 

Set the underlying transport object.

ACE_INLINE TAO_Transport * TAO_Connection_Handler::transport void   
 

Return the underlying transport object.

ACE_INLINE TAO_ORB_Core_TSS_Resources * TAO_Connection_Handler::tss_resources void    [protected]
 

Return our TSS Resources pointer.


Member Data Documentation

TAO_ORB_Core* TAO_Connection_Handler::orb_core_ [private]
 

Pointer to the TAO_ORB_Core.

ACE_Lock* TAO_Connection_Handler::pending_upcall_lock_ [private]
 

Lock for the <pending_upcalls_>. We can have more than one thread trying to access.

long TAO_Connection_Handler::pending_upcalls_ [private]
 

Count nested upcalls on this svc_handler i.e., the connection can close during nested upcalls, you should not delete the svc_handler until the stack unwinds from the nested upcalls.

long TAO_Connection_Handler::reference_count_ [private]
 

TAO_Transport* TAO_Connection_Handler::transport_ [private]
 

Transport object reference.

TAO_ORB_Core_TSS_Resources* TAO_Connection_Handler::tss_resources_ [private]
 

Cached tss resources of the ORB that activated this object.


The documentation for this class was generated from the following files:
Generated on Thu Oct 10 18:29:51 2002 for TAO by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001