#include <Reactive_Flushing_Strategy.h>
Inheritance diagram for TAO_Reactive_Flushing_Strategy:


Public Member Functions | |
| virtual int | schedule_output (TAO_Transport *transport) |
| virtual int | cancel_output (TAO_Transport *transport) |
| Cancel all scheduled output for the transport argument. | |
| virtual int | flush_message (TAO_Transport *transport, TAO_Queued_Message *msg, ACE_Time_Value *max_wait_time) |
| virtual int | flush_transport (TAO_Transport *transport) |
| Wait until the transport has no messages queued. | |
Definition at line 31 of file Reactive_Flushing_Strategy.h.
|
|
Cancel all scheduled output for the transport argument.
Implements TAO_Flushing_Strategy. Definition at line 23 of file Reactive_Flushing_Strategy.cpp. References TAO_Transport::cancel_output_i().
00024 {
00025 return transport->cancel_output_i ();
00026 }
|
|
||||||||||||||||
|
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 29 of file Reactive_Flushing_Strategy.cpp. References TAO_Queued_Message::all_data_sent(), TAO_Transport::orb_core(), and TAO_ORB_Core::run().
00032 {
00033 int result = 0;
00034
00035 // @@ Should we pass this down? Can we?
00036 try
00037 {
00038 TAO_ORB_Core * const orb_core = transport->orb_core ();
00039
00040 while (!msg->all_data_sent () && result >= 0)
00041 {
00042 result = orb_core->run (max_wait_time, 1);
00043 }
00044 }
00045 catch (const ::CORBA::Exception&)
00046 {
00047 return -1;
00048 }
00049
00050 return result;
00051 }
|
|
|
Wait until the transport has no messages queued.
Implements TAO_Flushing_Strategy. Definition at line 54 of file Reactive_Flushing_Strategy.cpp. References TAO_Transport::orb_core(), TAO_Transport::queue_is_empty(), and TAO_ORB_Core::run().
00055 {
00056 // @@ Should we pass this down? Can we?
00057 try
00058 {
00059 TAO_ORB_Core * const orb_core = transport->orb_core ();
00060
00061 while (!transport->queue_is_empty ())
00062 {
00063 if (orb_core->run (0, 1) == -1)
00064 return -1;
00065 }
00066 }
00067 catch (const ::CORBA::Exception&)
00068 {
00069 return -1;
00070 }
00071
00072 return 0;
00073 }
|
|
|
Schedule the transport argument to be flushed If -2 is returned then the caller must call one of the flush_* methods. If -1 is returned then there was an error. If 0 is returned then the flush was scheduled successfully. Implements TAO_Flushing_Strategy. Definition at line 17 of file Reactive_Flushing_Strategy.cpp. References TAO_Transport::schedule_output_i().
00018 {
00019 return transport->schedule_output_i ();
00020 }
|
1.3.6