#include <Reactive_Flushing_Strategy.h>
Inheritance diagram for TAO_Reactive_Flushing_Strategy:
Public Member Functions | |
virtual int | schedule_output (TAO_Transport *transport) |
Schedule the transport argument to be flushed. | |
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 ACE_CATCHANY, ACE_DECLARE_NEW_CORBA_ENV, ACE_ENDTRY, ACE_ENV_ARG_PARAMETER, ACE_TRY, ACE_TRY_CHECK, 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 ACE_DECLARE_NEW_CORBA_ENV; 00037 ACE_TRY 00038 { 00039 TAO_ORB_Core * const orb_core = transport->orb_core (); 00040 00041 while (!msg->all_data_sent () && result >= 0) 00042 { 00043 result = orb_core->run (max_wait_time, 1 ACE_ENV_ARG_PARAMETER); 00044 ACE_TRY_CHECK; 00045 } 00046 } 00047 ACE_CATCHANY 00048 { 00049 return -1; 00050 } 00051 ACE_ENDTRY; 00052 00053 return result; 00054 } |
|
Wait until the transport has no messages queued.
Implements TAO_Flushing_Strategy. Definition at line 57 of file Reactive_Flushing_Strategy.cpp. References ACE_CATCHANY, ACE_DECLARE_NEW_CORBA_ENV, ACE_ENDTRY, ACE_ENV_ARG_PARAMETER, ACE_TRY, ACE_TRY_CHECK, TAO_Transport::orb_core(), TAO_Transport::queue_is_empty(), and TAO_ORB_Core::run().
00058 { 00059 // @@ Should we pass this down? Can we? 00060 ACE_DECLARE_NEW_CORBA_ENV; 00061 ACE_TRY 00062 { 00063 TAO_ORB_Core * const orb_core = transport->orb_core (); 00064 00065 while (!transport->queue_is_empty ()) 00066 { 00067 int const result = orb_core->run (0, 1 ACE_ENV_ARG_PARAMETER); 00068 ACE_TRY_CHECK; 00069 00070 if (result == -1) 00071 return -1; 00072 } 00073 } 00074 ACE_CATCHANY 00075 { 00076 return -1; 00077 } 00078 ACE_ENDTRY; 00079 00080 return 0; 00081 } |
|
Schedule the transport argument to be flushed.
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 } |