5 #include <Poco/AtomicCounter.h>
6 #include <Poco/Mutex.h>
8 #include "core/Exporter.h"
9 #include "gwmessage/GWMessage.h"
10 #include "server/GWSConnector.h"
11 #include "server/GWSListener.h"
12 #include "util/Loggable.h"
30 typedef Poco::SharedPtr<GWSOptimisticExporter> Ptr;
34 void setConnector(GWSConnector::Ptr connector);
35 void setExportNonConfirmed(
int count);
51 void onOther(
const GWMessage::Ptr message)
override;
64 size_t m_exportNonConfirmed;
65 GWSConnector::Ptr m_connector;
66 Poco::AtomicCounter m_connected;
67 std::set<GlobalID> m_exported;
68 Poco::FastMutex m_lock;
Definition: SensorData.h:20
void onOther(const GWMessage::Ptr message) override
Process confirmations of exported data.
Definition: GWSOptimisticExporter.cpp:69
Definition: Exporter.h:11
GWSOptimisticExporter implements exporting via GWSConnector. It wraps the given SensorData instances ...
Definition: GWSOptimisticExporter.h:25
Definition: GWSListener.h:23
void onDisconnected(const GWSListener::Address &) override
Notice that the GWSConnector is disconnected.
Definition: GWSOptimisticExporter.cpp:84
Definition: Loggable.h:19
bool ship(const SensorData &data) override
Ship the given data via GWSConnector::send() to the remote server. The connectivity status of the GWS...
Definition: GWSOptimisticExporter.cpp:37
GWSListener provides an interface for delivering of events and messages related to communication with...
Definition: GWSListener.h:19
void onConnected(const GWSListener::Address &) override
Notice that the GWSConnector is connected.
Definition: GWSOptimisticExporter.cpp:79