TAO  2.2.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
TAO_IIOP_Connection_Handler Class Reference

Handles requests on a single connection. More...

#include <IIOP_Connection_Handler.h>

Inheritance diagram for TAO_IIOP_Connection_Handler:
Inheritance graph
Collaboration diagram for TAO_IIOP_Connection_Handler:
Collaboration graph

Public Member Functions

 TAO_IIOP_Connection_Handler (ACE_Thread_Manager *=0)
 
 TAO_IIOP_Connection_Handler (TAO_ORB_Core *orb_core)
 Constructor. More...
 
 ~TAO_IIOP_Connection_Handler (void)
 Destructor. More...
 
virtual int open (void *)
 
int close (u_long=0)
 
int add_transport_to_cache (void)
 Add ourselves to Cache. More...
 
int process_listen_point_list (IIOP::ListenPointList &listen_list)
 Process the listen_list. More...
 
int enable_network_priority (void)
 Check if network priority needs to be enabled. More...
 
int set_dscp_codepoint (CORBA::Boolean set_network_priority)
 Set Diff-Serv codepoint on outgoing packets. More...
 
int set_dscp_codepoint (CORBA::Long dscp_codepoint)
 
virtual int open_handler (void *)
 A open () hook. More...
 
void abort (void)
 
Event Handler overloads
virtual int resume_handler (void)
 
virtual int close_connection (void)
 Close the underlying connection. More...
 
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)
 
- Public Member Functions inherited from ACE_Task< SYNCH_TRAITS >
 ACE_Task (ACE_Thread_Manager *thr_mgr=0, ACE_Message_Queue< ACE_SYNCH_USE, TIME_POLICY > *mq=0)
 
virtual ~ACE_Task (void)
 
ACE_Message_Queue
< ACE_SYNCH_USE, TIME_POLICY > * 
msg_queue (void)
 
void msg_queue (ACE_Message_Queue< ACE_SYNCH_USE, TIME_POLICY > *)
 
ACE_Time_Value_T< TIME_POLICY > gettimeofday (void) const
 
void set_time_policy (TIME_POLICY const &time_policy)
 
int putq (ACE_Message_Block *, ACE_Time_Value *timeout=0)
 
int getq (ACE_Message_Block *&mb, ACE_Time_Value *timeout=0)
 
int ungetq (ACE_Message_Block *, ACE_Time_Value *timeout=0)
 
int reply (ACE_Message_Block *mb, ACE_Time_Value *tv=0)
 
int put_next (ACE_Message_Block *msg, ACE_Time_Value *timeout=0)
 
const ACE_TCHARname (void) const
 
ACE_Task< ACE_SYNCH_USE,
TIME_POLICY > * 
next (void)
 
void next (ACE_Task< ACE_SYNCH_USE, TIME_POLICY > *)
 
ACE_Task< ACE_SYNCH_USE,
TIME_POLICY > * 
sibling (void)
 
ACE_Module< ACE_SYNCH_USE,
TIME_POLICY > * 
module (void) const
 
int flush (u_long flag=ACE_Task_Flags::ACE_FLUSHALL)
 
void water_marks (ACE_IO_Cntl_Msg::ACE_IO_Cntl_Cmds, size_t)
 
void dump (void) const
 
- Public Member Functions inherited from TAO_Connection_Handler
 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...
 
bool is_closed (void) const
 Is the handler closed or timed out? More...
 
bool is_open (void) const
 Is the handler open? More...
 
bool is_timeout (void) const
 Closed due to timeout? More...
 
bool is_connecting (void) const
 Is the handler in the process of being connected? More...
 
int svc_i (void)
 
virtual int close_handler (u_long flags=0)
 
void connection_pending (void)
 
void cancel_pending_connection (void)
 
- Public Member Functions inherited from TAO_LF_CH_Event
 TAO_LF_CH_Event (void)
 Constructor. More...
 
virtual ~TAO_LF_CH_Event (void)
 Destructor. More...
 
int successful (void) const
 
int error_detected (void) const
 
- Public Member Functions inherited from TAO_LF_Event
 TAO_LF_Event (void)
 Constructor. More...
 
virtual ~TAO_LF_Event (void)
 Destructor. More...
 
void reset_state (int new_state)
 Reset the state, irrespective of the previous states. More...
 
void state_changed (int new_state, TAO_Leader_Follower &lf)
 
int keep_waiting (void)
 Check if we should keep waiting. More...
 

Protected Member Functions

virtual int handle_write_ready (const ACE_Time_Value *timeout)
 
int set_tos (int tos)
 
TAO_Connection Handler overloads
virtual int release_os_resources (void)
 Release the OS resources related to this handler. More...
 
- Protected Member Functions inherited from TAO_Connection_Handler
TAO_ORB_Coreorb_core (void)
 Return our TAO_ORB_Core pointer. More...
 
int shared_open (void)
 
int set_socket_option (ACE_SOCK &sock, int snd_size, int rcv_size)
 Set options on the socket. 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...
 
int handle_input_internal (ACE_HANDLE h, ACE_Event_Handler *eh)
 Implement the handle_output() callback. More...
 
int close_connection_eh (ACE_Event_Handler *eh)
 
virtual void pre_io_hook (int &return_value)
 
virtual void pos_io_hook (int &return_value)
 
- Protected Member Functions inherited from TAO_LF_CH_Event
virtual int is_state_final (void)
 Check whether we have reached the final state.. More...
 

Private Attributes

int dscp_codepoint_
 Stores the type of service value. More...
 

Additional Inherited Members

- Public Types inherited from TAO_LF_Event
enum  {
  LFS_IDLE = 0, LFS_ACTIVE, LFS_CONNECTION_WAIT, LFS_SUCCESS,
  LFS_FAILURE, LFS_TIMEOUT, LFS_CONNECTION_CLOSED
}
 
- Static Public Member Functions inherited from TAO_LF_Event
static const char * state_name (int st)
 
- Public Attributes inherited from ACE_Task< SYNCH_TRAITS >
ACE_Message_Queue
< ACE_SYNCH_USE, TIME_POLICY > * 
msg_queue_
 
bool delete_msg_queue_
 
ACE_Module< ACE_SYNCH_USE,
TIME_POLICY > * 
mod_
 
ACE_Task< ACE_SYNCH_USE,
TIME_POLICY > * 
next_
 
 ACE_ALLOC_HOOK_DECLARE
 
- Protected Attributes inherited from TAO_LF_Event
int state_
 The current state. More...
 
TAO_LF_Followerfollower_
 The bounded follower. More...
 

Detailed Description

Handles requests on a single connection.

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

Constructor & Destructor Documentation

TAO_IIOP_Connection_Handler::TAO_IIOP_Connection_Handler ( ACE_Thread_Manager t = 0)
TAO_IIOP_Connection_Handler::TAO_IIOP_Connection_Handler ( TAO_ORB_Core orb_core)

Constructor.

TAO_IIOP_Connection_Handler::~TAO_IIOP_Connection_Handler ( void  )

Destructor.

Member Function Documentation

void TAO_IIOP_Connection_Handler::abort ( void  )

This is used during a canceled connection attempt. Force the SO_LINGER timeout to 0 so that when the peer is closed, it won't hang around.

int TAO_IIOP_Connection_Handler::add_transport_to_cache ( void  )

Add ourselves to Cache.

int TAO_IIOP_Connection_Handler::close ( u_long  flags = 0)

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

int TAO_IIOP_Connection_Handler::close_connection ( void  )
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.

Implements TAO_Connection_Handler.

int TAO_IIOP_Connection_Handler::enable_network_priority ( void  )

Check if network priority needs to be enabled.

int TAO_IIOP_Connection_Handler::handle_close ( ACE_HANDLE  ,
ACE_Reactor_Mask   
)
virtual
int TAO_IIOP_Connection_Handler::handle_input ( ACE_HANDLE  fd)
virtual

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

Implements TAO_Connection_Handler.

int TAO_IIOP_Connection_Handler::handle_output ( ACE_HANDLE  handle)
virtual
int TAO_IIOP_Connection_Handler::handle_timeout ( const ACE_Time_Value current_time,
const void *  act = 0 
)
virtual
int TAO_IIOP_Connection_Handler::handle_write_ready ( const ACE_Time_Value timeout)
protectedvirtual

Derived classes should implement this for proper support with the Blocking Flushing Strategy.

Reimplemented from TAO_Connection_Handler.

int TAO_IIOP_Connection_Handler::open ( void *  )
virtual

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

int TAO_IIOP_Connection_Handler::open_handler ( void *  )
virtual

A open () hook.

See Thread_Per_Connection_Handler for a use case

Implements TAO_Connection_Handler.

int TAO_IIOP_Connection_Handler::process_listen_point_list ( IIOP::ListenPointList listen_list)

Process the listen_list.

int TAO_IIOP_Connection_Handler::release_os_resources ( void  )
protectedvirtual

Release the OS resources related to this handler.

Reimplemented from TAO_Connection_Handler.

int TAO_IIOP_Connection_Handler::resume_handler ( void  )
virtual
int TAO_IIOP_Connection_Handler::set_dscp_codepoint ( CORBA::Boolean  set_network_priority)
virtual

Set Diff-Serv codepoint on outgoing packets.

Reimplemented from TAO_Connection_Handler.

int TAO_IIOP_Connection_Handler::set_dscp_codepoint ( CORBA::Long  dscp_codepoint)
virtual

Reimplemented from TAO_Connection_Handler.

int TAO_IIOP_Connection_Handler::set_tos ( int  tos)
protected

helper function used by the set_dscp_codepoint () methods to set the TOS field in the IP packets.

Member Data Documentation

int TAO_IIOP_Connection_Handler::dscp_codepoint_
private

Stores the type of service value.


The documentation for this class was generated from the following files: