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

Use the Leader/Follower loop to wait for one specific event in the invocation path. More...

#include <LF_CH_Event.h>

Inheritance diagram for TAO_LF_CH_Event:
Inheritance graph
Collaboration diagram for TAO_LF_CH_Event:
Collaboration graph

Public Member Functions

 TAO_LF_CH_Event (void)
 Constructor. More...
 
virtual ~TAO_LF_CH_Event (void)
 Destructor. More...
 
- 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...
 

Private Types

typedef
ACE_Hash_Map_Manager_Ex
< TAO_LF_Follower *, int,
ACE_Hash< void * >
, ACE_Equal_To
< TAO_LF_Follower * >
, TAO_SYNCH_MUTEX
HASH_MAP
 

Private Member Functions

virtual void state_changed_i (int new_state)
 Validate and change the state. More...
 
virtual void set_state (int new_state)
 Set the state irrespective of anything. More...
 
virtual int bind (TAO_LF_Follower *follower)
 Bind a follower. More...
 
virtual int unbind (TAO_LF_Follower *follower)
 Unbind the follower. More...
 
void validate_state_change (int new_state)
 

Private Attributes

int prev_state_
 The previous state that the LF_CH_Event was in. More...
 
HASH_MAP followers_
 

Friends

class TAO_LF_Multi_Event
 
int successful (void) const
 
int error_detected (void) const
 
virtual int is_state_final (void)
 Check whether we have reached the final state.. 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)
 
- Protected Attributes inherited from TAO_LF_Event
int state_
 The current state. More...
 
TAO_LF_Followerfollower_
 The bounded follower. More...
 

Detailed Description

Use the Leader/Follower loop to wait for one specific event in the invocation path.

Concrete event types and manipulation class which is used for connection handling purposes.

Member Typedef Documentation

Constructor & Destructor Documentation

TAO_LF_CH_Event::TAO_LF_CH_Event ( void  )

Constructor.

TAO_LF_CH_Event::~TAO_LF_CH_Event ( void  )
virtual

Destructor.

Member Function Documentation

int TAO_LF_CH_Event::bind ( TAO_LF_Follower follower)
privatevirtual

Bind a follower.

An event can be waited on by at most one follower thread, this method is used to bind the waiting thread to the event, in order to let the event signal any important state changes.

This is virtual to allow the LF_Multi_Event derived type share the follower with all the subordinate LF_CH_Events.

Returns
-1 if the LF_Event is already bound, 0 otherwise

Reimplemented from TAO_LF_Event.

int TAO_LF_CH_Event::error_detected ( void  ) const
virtual

Return 1 if an error was detected while waiting for the event

Implements TAO_LF_Event.

int TAO_LF_CH_Event::is_state_final ( void  )
protectedvirtual

Check whether we have reached the final state..

Implements TAO_LF_Event.

void TAO_LF_CH_Event::set_state ( int  new_state)
privatevirtual

Set the state irrespective of anything.

Reimplemented from TAO_LF_Event.

void TAO_LF_CH_Event::state_changed_i ( int  new_state)
privatevirtual

Validate and change the state.

Implements TAO_LF_Event.

int TAO_LF_CH_Event::successful ( void  ) const
virtual

Return 1 if the condition was satisfied successfully, 0 if it has not

Implements TAO_LF_Event.

int TAO_LF_CH_Event::unbind ( TAO_LF_Follower follower)
privatevirtual

Unbind the follower.

Reimplemented from TAO_LF_Event.

void TAO_LF_CH_Event::validate_state_change ( int  new_state)
private

Friends And Related Function Documentation

friend class TAO_LF_Multi_Event
friend

The TAO_LF_Multi_Event class is another specialization of TAO_LF_Event, used for aggregating many connection handlers into a single event object. It requires friendship so that it can check the is_state_final() flag on each of its contained connection handlers.

Member Data Documentation

HASH_MAP TAO_LF_CH_Event::followers_
private
int TAO_LF_CH_Event::prev_state_
private

The previous state that the LF_CH_Event was in.


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