Line data Source code
1 : /* 2 : * 3 : * 4 : * Distributed under the OpenDDS License. 5 : * See: http://www.opendds.org/license.html 6 : */ 7 : 8 : #ifndef OPENDDS_DCPS_TRANSPORT_FRAMEWORK_SENDRESPONSELISTENER_H 9 : #define OPENDDS_DCPS_TRANSPORT_FRAMEWORK_SENDRESPONSELISTENER_H 10 : 11 : #include "dds/DCPS/dcps_export.h" 12 : #include "TransportSendListener.h" 13 : #include "dds/DCPS/MessageTracker.h" 14 : #include "dds/DCPS/PoolAllocator.h" 15 : 16 : OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL 17 : 18 : namespace OpenDDS { 19 : namespace DCPS { 20 : 21 : /** 22 : * @class SendResponseListener 23 : * 24 : * @brief Simple listener to discard response samples. 25 : * 26 : * This is a simple listener implementation used to release response 27 : * samples once they have been either delivered or dropped. No 28 : * special actions are taken to distinguish between the two results. 29 : */ 30 : class OpenDDS_Dcps_Export SendResponseListener 31 : : public TransportSendListener { 32 : public: 33 : explicit SendResponseListener(const OPENDDS_STRING& msg_src); 34 : virtual ~SendResponseListener(); 35 : 36 : virtual void data_delivered(const DataSampleElement* sample); 37 : virtual void data_dropped(const DataSampleElement* sample, 38 : bool dropped_by_transport); 39 : 40 : virtual void control_delivered(const Message_Block_Ptr& sample); 41 : virtual void control_dropped(const Message_Block_Ptr& sample, 42 : bool dropped_by_transport); 43 : 44 0 : void notify_publication_disconnected(const ReaderIdSeq&) {} 45 0 : void notify_publication_reconnected(const ReaderIdSeq&) {} 46 0 : void notify_publication_lost(const ReaderIdSeq&) {} 47 0 : void remove_associations(const ReaderIdSeq&, bool) {} 48 0 : void replay_durable_data_for(const GUID_t&) {} 49 : 50 : void track_message(); 51 : 52 : private: 53 0 : void _add_ref() {} 54 0 : void _remove_ref() {} 55 : 56 : MessageTracker tracker_; 57 : }; 58 : 59 : } // namespace DCPS 60 : } // namespace OpenDDS 61 : 62 : OPENDDS_END_VERSIONED_NAMESPACE_DECL 63 : 64 : #endif /* OPENDDS_DCPS_SENDRESPONSELISTENER_H */