Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

TAO_Block_Flushing_Strategy Class Reference

Implement a flushing strategy that blocks on write to flush. More...

#include <Block_Flushing_Strategy.h>

Inheritance diagram for TAO_Block_Flushing_Strategy:

Inheritance graph
[legend]
Collaboration diagram for TAO_Block_Flushing_Strategy:

Collaboration graph
[legend]
List of all members.

Public Methods

virtual int schedule_output (TAO_Transport *transport)
 Schedule the transport argument to be flushed. More...

virtual int cancel_output (TAO_Transport *transport)
 Cancel all scheduled output for the transport argument. More...

virtual int flush_message (TAO_Transport *transport, TAO_Queued_Message *msg, ACE_Time_Value *max_wait_time)
 Wait until msg is sent out. Potentially other messages are flushed too, for example, because there are ahead in the queue. More...

virtual int flush_transport (TAO_Transport *transport)
 Wait until the transport has no messages queued. More...


Detailed Description

Implement a flushing strategy that blocks on write to flush.

Definition at line 28 of file Block_Flushing_Strategy.h.


Member Function Documentation

int TAO_Block_Flushing_Strategy::cancel_output TAO_Transport   transport [virtual]
 

Cancel all scheduled output for the transport argument.

Implements TAO_Flushing_Strategy.

Definition at line 24 of file Block_Flushing_Strategy.cpp.

00025 {
00026   return 0;
00027 }

int TAO_Block_Flushing_Strategy::flush_message TAO_Transport   transport,
TAO_Queued_Message   msg,
ACE_Time_Value   max_wait_time
[virtual]
 

Wait until msg is sent out. Potentially other messages are flushed too, for example, because there are ahead in the queue.

Implements TAO_Flushing_Strategy.

Definition at line 30 of file Block_Flushing_Strategy.cpp.

References TAO_Queued_Message::all_data_sent, and TAO_Transport::handle_output.

00033 {
00034   while (!msg->all_data_sent ())
00035     {
00036       int result = transport->handle_output ();
00037       if (result == -1)
00038         return -1;
00039     }
00040   return 0;
00041 }

int TAO_Block_Flushing_Strategy::flush_transport TAO_Transport   transport [virtual]
 

Wait until the transport has no messages queued.

Implements TAO_Flushing_Strategy.

Definition at line 44 of file Block_Flushing_Strategy.cpp.

References TAO_Transport::handle_output, and TAO_Transport::queue_is_empty.

00045 {
00046   while (!transport->queue_is_empty ())
00047     {
00048       int result = transport->handle_output ();
00049       if (result == -1)
00050         return -1;
00051     }
00052   return 0;
00053 }

int TAO_Block_Flushing_Strategy::schedule_output TAO_Transport   transport [virtual]
 

Schedule the transport argument to be flushed.

Implements TAO_Flushing_Strategy.

Definition at line 12 of file Block_Flushing_Strategy.cpp.

References TAO_Transport::drain_queue_i, and TAO_Transport::queue_is_empty_i.

00013 {
00014   while (!transport->queue_is_empty_i ())
00015     {
00016       int result = transport->drain_queue_i ();
00017       if (result == -1)
00018         return -1;
00019     }
00020   return 0;
00021 }


The documentation for this class was generated from the following files:
Generated on Mon Jun 16 15:04:22 2003 for TAO by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002