TAO  2.3.3
Public Types | Public Member Functions | Private Attributes | List of all members
TAO_Resume_Handle Class Reference

A utility class that helps in resuming handlers if TAO uses a TP Reactor from ACE. More...

#include <Resume_Handle.h>

Collaboration diagram for TAO_Resume_Handle:
Collaboration graph
[legend]

Public Types

enum  TAO_Handle_Resume_Flag { TAO_HANDLE_RESUMABLE = 0, TAO_HANDLE_ALREADY_RESUMED, TAO_HANDLE_LEAVE_SUSPENDED }
 

Public Member Functions

 TAO_Resume_Handle (TAO_ORB_Core *orb_core=0, ACE_HANDLE h=ACE_INVALID_HANDLE)
 Constructor. More...
 
 ~TAO_Resume_Handle (void)
 Destructor. More...
 
void set_flag (TAO_Handle_Resume_Flag fl)
 Allow the users of this class to change the underlying flag. More...
 
TAO_Resume_Handleoperator= (const TAO_Resume_Handle &rhs)
 Assignment operator. More...
 
void resume_handle (void)
 
void handle_input_return_value_hook (int &return_value)
 

Private Attributes

TAO_ORB_Coreorb_core_
 Our ORB Core. More...
 
ACE_HANDLE handle_
 The actual handle that needs resumption.. More...
 
TAO_Handle_Resume_Flag flag_
 

Detailed Description

A utility class that helps in resuming handlers if TAO uses a TP Reactor from ACE.

Please read the documentation in the bugzilla #575 in the bugzilla database what we mean by handler resumption.

When TAO uses a TP reactor, it takes care of resuming the handler once it makes sure that it has read the whole message out of the socket. During the process of reading the transport object would have to deal with errors in 'read' from the socket, or errors in the messages that has been received. Instead of calling resume_handler () on the reactor at every point in the code, we use this utility class to take care of the resumption.

Member Enumeration Documentation

Enumerator
TAO_HANDLE_RESUMABLE 
TAO_HANDLE_ALREADY_RESUMED 
TAO_HANDLE_LEAVE_SUSPENDED 

Constructor & Destructor Documentation

TAO_Resume_Handle::TAO_Resume_Handle ( TAO_ORB_Core orb_core = 0,
ACE_HANDLE  h = ACE_INVALID_HANDLE 
)

Constructor.

TAO_Resume_Handle::~TAO_Resume_Handle ( void  )

Destructor.

Member Function Documentation

void TAO_Resume_Handle::handle_input_return_value_hook ( int &  return_value)

Hook method called at the end of a connection handler's handle_input function. Might override the handle_input return value or change the resume_handler's flag_ value.

TAO_Resume_Handle & TAO_Resume_Handle::operator= ( const TAO_Resume_Handle rhs)

Assignment operator.

void TAO_Resume_Handle::resume_handle ( void  )

Resume the handle in the reactor only if the ORB uses a TP reactor. Else we don't resume the handle.

void TAO_Resume_Handle::set_flag ( TAO_Handle_Resume_Flag  fl)

Allow the users of this class to change the underlying flag.

Member Data Documentation

TAO_Handle_Resume_Flag TAO_Resume_Handle::flag_
private

The flag for indicating whether the handle has been resumed or not. A value of '0' indicates that the handle needs resumption.

ACE_HANDLE TAO_Resume_Handle::handle_
private

The actual handle that needs resumption..

TAO_ORB_Core* TAO_Resume_Handle::orb_core_
private

Our ORB Core.


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