Public Member Functions | Protected Attributes

TAO_Wait_Strategy Class Reference

Strategy for waiting for the reply. More...

#include <Wait_Strategy.h>

Inheritance diagram for TAO_Wait_Strategy:
Inheritance graph
[legend]
Collaboration diagram for TAO_Wait_Strategy:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 TAO_Wait_Strategy (TAO_Transport *transport)
 Constructor.
virtual ~TAO_Wait_Strategy (void)
 Destructor.
virtual int sending_request (TAO_ORB_Core *orb_core, int two_way)
virtual int wait (ACE_Time_Value *max_wait_time, TAO_Synch_Reply_Dispatcher &rd)=0
virtual int register_handler (void)=0
virtual bool non_blocking (void) const =0
virtual bool can_process_upcalls (void) const =0
bool is_registered (void) const
 Get method for the flag.
void is_registered (bool flag)
 Set method for the flag.

Protected Attributes

TAO_Transporttransport_
 Transport object.
bool is_registered_

Detailed Description

Strategy for waiting for the reply.

Definition at line 42 of file Wait_Strategy.h.


Constructor & Destructor Documentation

TAO_Wait_Strategy::TAO_Wait_Strategy ( TAO_Transport transport  ) 

Constructor.

Definition at line 18 of file Wait_Strategy.cpp.

  : transport_ (transport),
    is_registered_ (false)
{
}

TAO_Wait_Strategy::~TAO_Wait_Strategy ( void   )  [virtual]

Destructor.

Definition at line 25 of file Wait_Strategy.cpp.

{
}


Member Function Documentation

virtual bool TAO_Wait_Strategy::can_process_upcalls ( void   )  const [pure virtual]

Flag that indicates whether we can process requests while waiting for the reply. This flag is to check whether the thread can process upcalls while waiting for the reply. Some wait strategies, like Wait_On_LF_No_Upcall does not allow the client threads to process requests while waiting for the reply.

Implemented in TAO_Wait_On_Leader_Follower, TAO::Wait_On_LF_No_Upcall, TAO_Wait_On_Reactor, and TAO_Wait_On_Read.

void TAO_Wait_Strategy::is_registered ( bool  flag  ) 

Set method for the flag.

Definition at line 12 of file Wait_Strategy.inl.

{
  this->is_registered_ = flag;
}

bool TAO_Wait_Strategy::is_registered ( void   )  const

Get method for the flag.

Definition at line 6 of file Wait_Strategy.inl.

{
  return this->is_registered_;
}

virtual bool TAO_Wait_Strategy::non_blocking ( void   )  const [pure virtual]

Returns a value to indicate whether the transport needs to set the socket on which it is waiting to non-blocking mode or not.

Implemented in TAO_Wait_On_Leader_Follower, TAO_Wait_On_Reactor, and TAO_Wait_On_Read.

virtual int TAO_Wait_Strategy::register_handler ( void   )  [pure virtual]

Register the handler needs with the reactor provided that it makes sense for the strategy.

Implemented in TAO_Wait_On_Leader_Follower, TAO_Wait_On_Reactor, and TAO_Wait_On_Read.

int TAO_Wait_Strategy::sending_request ( TAO_ORB_Core orb_core,
int  two_way 
) [virtual]

The user is going to send a request, prepare any internal variables because the reply may arrive *before* the user calls wait.

Reimplemented in TAO_Wait_On_Leader_Follower.

Definition at line 34 of file Wait_Strategy.cpp.

{
  return 0;
}

virtual int TAO_Wait_Strategy::wait ( ACE_Time_Value max_wait_time,
TAO_Synch_Reply_Dispatcher rd 
) [pure virtual]

Base class virtual method. Wait till the reply_received flag is true or the time expires.

Implemented in TAO_Wait_On_Leader_Follower, TAO::Wait_On_LF_No_Upcall, TAO_Wait_On_Reactor, and TAO_Wait_On_Read.


Member Data Documentation

Flag to indicate whether the service handler that created the above transport has been registered with the reactor or not. The default is false.

Definition at line 95 of file Wait_Strategy.h.

Transport object.

Definition at line 90 of file Wait_Strategy.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines