00001 // -*- C++ -*- 00002 00003 //============================================================================= 00004 /** 00005 * @file Block_Flushing_Strategy.h 00006 * 00007 * $Id: Block_Flushing_Strategy.h 85817 2009-06-26 20:44:58Z mitza $ 00008 * 00009 * @author Carlos O'Ryan <coryan@uci.edu> 00010 */ 00011 //============================================================================= 00012 00013 #ifndef TAO_BLOCK_FLUSHING_STRATEGY_H 00014 #define TAO_BLOCK_FLUSHING_STRATEGY_H 00015 #include /**/ "ace/pre.h" 00016 00017 #include "tao/Flushing_Strategy.h" 00018 00019 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00020 # pragma once 00021 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00022 00023 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00024 00025 namespace TAO 00026 { 00027 namespace Transport 00028 { 00029 class Drain_Constraints; 00030 } 00031 } 00032 00033 /** 00034 * @class TAO_Block_Flushing_Strategy 00035 * 00036 * @brief Implement a flushing strategy that blocks on write to flush 00037 */ 00038 class TAO_Block_Flushing_Strategy : public TAO_Flushing_Strategy 00039 { 00040 public: 00041 virtual int schedule_output (TAO_Transport *transport); 00042 virtual int cancel_output (TAO_Transport *transport); 00043 virtual int flush_message (TAO_Transport *transport, 00044 TAO_Queued_Message *msg, 00045 ACE_Time_Value *max_wait_time); 00046 virtual int flush_transport (TAO_Transport *transport 00047 , ACE_Time_Value *max_wait_time); 00048 00049 private: 00050 int call_handle_output (TAO_Transport *transport, 00051 const TAO::Transport::Drain_Constraints &dc); 00052 }; 00053 00054 TAO_END_VERSIONED_NAMESPACE_DECL 00055 00056 #include /**/ "ace/post.h" 00057 #endif /* TAO_BLOCK_FLUSHING_STRATEGY_H */