Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class 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 Member Functions

 TAO_Connection_Handler (void)
 Constructor.
 TAO_Connection_Handler (TAO_ORB_Core *orb_core)
 Constructor.
virtual ~TAO_Connection_Handler (void)
 Destructor.
TAO_Transporttransport (void)
 Return the underlying transport object.
void transport (TAO_Transport *transport)
 Set the underlying transport object.
bool is_closed (void) const
 Is the handler closed?
bool is_open (void) const
 Is the handler open?
bool is_connecting (void) const
 Is the handler in the process of being connected?
virtual int close_connection (void)=0
 Close the underlying connection.
virtual int handle_input (ACE_HANDLE fd)=0
int svc_i (void)
virtual int open_handler (void *)=0
 A open () hook.
virtual int close_handler (void)
virtual int set_dscp_codepoint (CORBA::Boolean set_network_priority)
virtual int release_os_resources (void)
 Release the OS resources related to this handler.

Protected Member Functions

TAO_ORB_Coreorb_core (void)
 Return our TAO_ORB_Core pointer.
int set_socket_option (ACE_SOCK &sock, int snd_size, int rcv_size)
 Set options on the socket.
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.

int handle_output_eh (ACE_HANDLE h, ACE_Event_Handler *eh)
 Implement the handle_output() callback.
int handle_input_eh (ACE_HANDLE h, ACE_Event_Handler *eh)
 Implement the handle_input() callback.
int handle_input_internal (ACE_HANDLE h, ACE_Event_Handler *eh)
 Implement the handle_output() callback.
int close_connection_eh (ACE_Event_Handler *eh)
virtual void pre_io_hook (int &return_value)
virtual void pos_io_hook (int &return_value)

Private Attributes

TAO_ORB_Coreorb_core_
 Pointer to the TAO_ORB_Core.
TAO_Transporttransport_
 Transport object reference.
ACE_Locklock_

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

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

virtual int TAO_Connection_Handler::close_connection void   )  [pure virtual]
 

Close the underlying connection.

Used by the ORB to actively close connections that are idle, stale or somehow are determined to be broken before the Reactor does.

Returns:
Return 0 if the connection was already closed, non-zero otherwise.

Implemented in TAO_IIOP_Connection_Handler.

int TAO_Connection_Handler::close_connection_eh ACE_Event_Handler eh  )  [protected]
 

Implement close_connection() for Connection_Handlers that are also Event_Handlers.

int TAO_Connection_Handler::close_handler void   )  [virtual]
 

A close() hook, called by the Transport Connector when they want to close this handler

virtual int TAO_Connection_Handler::handle_input ACE_HANDLE  fd  )  [pure virtual]
 

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

Implemented 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_input_internal ACE_HANDLE  h,
ACE_Event_Handler eh
[protected]
 

Implement the handle_output() callback.

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

Implement the handle_output() callback.

ACE_INLINE bool TAO_Connection_Handler::is_closed void   )  const
 

Is the handler closed?

ACE_INLINE bool TAO_Connection_Handler::is_connecting void   )  const
 

Is the handler in the process of being connected?

ACE_INLINE bool TAO_Connection_Handler::is_open void   )  const
 

Is the handler open?

virtual int TAO_Connection_Handler::open_handler void *   )  [pure virtual]
 

A open () hook.

See Thread_Per_Connection_Handler for a use case

Implemented in TAO_IIOP_Connection_Handler.

ACE_INLINE TAO_ORB_Core * TAO_Connection_Handler::orb_core void   )  [protected]
 

Return our TAO_ORB_Core pointer.

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   )  [virtual]
 

Release the OS resources related to this handler.

Reimplemented in TAO_IIOP_Connection_Handler.

ACE_INLINE int TAO_Connection_Handler::set_dscp_codepoint CORBA::Boolean  set_network_priority  )  [virtual]
 

Set the Diff-Serv codepoint on outgoing packets. Only has effect for remote protocols (e.g., IIOP); no effect for local protocols (UIOP). Default implementation is for local protocols. Remote protocols must overwrite implementation.

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   ) 
 

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.


Member Data Documentation

ACE_Lock* TAO_Connection_Handler::lock_ [private]
 

Internal state lock, needs to be separate from the reference count / pending upcalls lock because they interleave.

TAO_ORB_Core* TAO_Connection_Handler::orb_core_ [private]
 

Pointer to the TAO_ORB_Core.

TAO_Transport* TAO_Connection_Handler::transport_ [private]
 

Transport object reference.


The documentation for this class was generated from the following files:
Generated on Thu Jun 9 00:17:11 2005 for TAO by  doxygen 1.3.9.1