BeeeOn Gateway
v2020.3.1-2-g6f737dc
Platform to interconnect the IoT world
|
Handle requests to the remote server: More...
#include <GWSCommandHandler.h>
Public Types | |
typedef Poco::SharedPtr < GWSCommandHandler > | Ptr |
Public Types inherited from BeeeOn::GWSListener | |
typedef Poco::SharedPtr < GWSListener > | Ptr |
Public Member Functions | |
void | setConnector (GWSConnector::Ptr connector) |
bool | accept (const Command::Ptr cmd) override |
void | handle (Command::Ptr cmd, Answer::Ptr answer) override |
void | onResponse (const GWResponse::Ptr response) override |
Check whether the responses associated with a pending command. If it is, update its result according to the response contents. | |
Public Member Functions inherited from BeeeOn::GWSListener | |
virtual void | onConnected (const Address &address) |
Fired when the connection to the remote server is successfully created and it is possible to exchange messages. | |
virtual void | onDisconnected (const Address &address) |
Fired when the connection to the remote server is considered broken or when it is disconnected on a request. | |
virtual void | onRequest (const GWRequest::Ptr request) |
When a request is received, this event is fired. | |
virtual void | onAck (const GWAck::Ptr ack) |
When an ack is received, this event is fired. | |
virtual void | onOther (const GWMessage::Ptr other) |
When a message other then request, response or ack is received, this event is fired. | |
virtual void | onTrySend (const GWMessage::Ptr message) |
Fire when a message is about to be sent to the server. After the send is successful (no network failure), the GWSListener::onSend() event would be generated as well. | |
virtual void | onSent (const GWMessage::Ptr message) |
Fire when a message is being sent to the server. There might be a delay between putting a messing into an output queue and the actual sending process. This event allows to track such delay. | |
Handle requests to the remote server:
The commands are converted to the appropriate GWMessage representations and sent to the remote server. Received responses are used to update the associated Answer and Result instances.