Safir SDK Core
|
Interface to receive entity requests. More...
#include <Safir/Dob/Consumer.h>
Public Member Functions | |
virtual | ~EntityRequestBase () |
Virtual destructor is needed since we have virtual member functions. More... | |
virtual void | OnCreateRequest (const Safir::Dob::EntityRequestProxy entityRequestProxy, Safir::Dob::ResponseSenderPtr responseSender)=0 |
Called when someone requests an entity to be created. More... | |
virtual void | OnUpdateRequest (const Safir::Dob::EntityRequestProxy entityRequestProxy, Safir::Dob::ResponseSenderPtr responseSender)=0 |
Called when someone requests an entity to be updated. More... | |
virtual void | OnDeleteRequest (const Safir::Dob::EntityRequestProxy entityRequestProxy, Safir::Dob::ResponseSenderPtr responseSender)=0 |
Called when someone requests an entity to be deleted. More... | |
Public Member Functions inherited from Safir::Dob::Internal::ConsumerBase | |
virtual | ~ConsumerBase () |
Interface to receive entity requests.
|
virtual |
Virtual destructor is needed since we have virtual member functions.
|
pure virtual |
Called when someone requests an entity to be created.
If the handler is registered as "HandlerDecidesInstanceId" the request does not contain an instance id, and the handler must decide which instance to use and must send this back to the requestor using an EntityIdResponse.
If the handler is registered as "RequestorDecidesInstanceId" the request contains an instance id, which the handler must use if is going to accept the request. If the instance cannot be used an error response must be sent. The handler must not send EntityIdResponse on successful create requests when it is registered as "RequestorDecidesInstanceId".
The receiver of the callback must send a response using the responseSender. It is possible to store the responseSender and send the response later after this method has returned. The responseSender is a smart-pointer which means that it will handle deletion of the underlaying object on its own.
[in] | entityRequestProxy | - Proxy object containing request and meta information. |
[in] | responseSender | - Used to send the response for the received request. |
|
pure virtual |
Called when someone requests an entity to be deleted.
The receiver of the callback must send a response using the responseSender. It is possible to store the responseSender and send the response later after this method has returned. The responseSender is a smart-pointer which means that it will handle deletion of the underlaying object on its own.
[in] | entityRequestProxy | - Proxy object containing request information. |
[in] | responseSender | - Used to send the response for the received request. |
|
pure virtual |
Called when someone requests an entity to be updated.
The receiver of the callback must send a response using the responseSender. It is possible to store the responseSender and send the response later after this method has returned. The responseSender is a smart-pointer which means that it will handle deletion of the underlaying object on its own.
[in] | entityRequestProxy | - Proxy object containing request and meta information. |
[in] | responseSender | - Used to send the response for the received request. |