Safir SDK Core
Loading...
Searching...
No Matches
Safir::Dob::ServiceRequestBase Class Referenceabstract

Interface to receive service requests. More...

#include <Safir/Dob/Consumer.h>

Inheritance diagram for Safir::Dob::ServiceRequestBase:
[legend]
Collaboration diagram for Safir::Dob::ServiceRequestBase:
[legend]

Public Member Functions

virtual ~ServiceRequestBase ()
 Virtual destructor is needed since we have virtual member functions.
 
virtual void OnServiceRequest (const Safir::Dob::ServiceRequestProxy serviceRequestProxy, Safir::Dob::ResponseSenderPtr responseSender)=0
 Called when a service request is received.
 
- Public Member Functions inherited from Safir::Dob::Internal::ConsumerBase
virtual ~ConsumerBase ()
 

Detailed Description

Interface to receive service requests.

Constructor & Destructor Documentation

◆ ~ServiceRequestBase()

virtual Safir::Dob::ServiceRequestBase::~ServiceRequestBase ( )
virtual

Virtual destructor is needed since we have virtual member functions.

Member Function Documentation

◆ OnServiceRequest()

virtual void Safir::Dob::ServiceRequestBase::OnServiceRequest ( const Safir::Dob::ServiceRequestProxy serviceRequestProxy,
Safir::Dob::ResponseSenderPtr responseSender )
pure virtual

Called when a service request is received.

The receiver of the callback must send a response using the responseSender. It is allowed 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.

Parameters
[in]serviceRequestProxy- Proxy object containing request object and meta information.
[in]responseSender- Used to send the response for the received request.