AceSmartSoft API Documentation
|
Handler Class for QueryServer for incoming requests. More...
#include <smartQueryServerHandler.hh>
Public Types | |
using | IQueryServer = Smart::IQueryServerPattern< R, A > |
this Alias simplifies usage in the handleQuery method More... | |
Public Member Functions | |
virtual | ~QueryServerHandler ()=default |
virtual void | handleQuery (IQueryServer &server, const Smart::QueryIdPtr &id, const R &request)=0 |
Handler method for an incoming query request. More... | |
Handler Class for QueryServer for incoming requests.
Used by the QueryServer to handle incoming queries. The user should provide the handleQuery() method by subclassing and register an instance of this handler class with the QueryServer.
using SmartACE::QueryServerHandler< R, A >::IQueryServer = Smart::IQueryServerPattern<R,A> |
this Alias simplifies usage in the handleQuery method
|
virtualdefault |
|
pure virtual |
Handler method for an incoming query request.
This method is called by the communication pattern every time a new query request is received. It must be provided by the component developer to handle incoming requests. Since the method is executed by the communication thread, it must be very fast and non-blocking.
Usually the request and the id will be inserted into a queue and another working thread processes the request and provides the result. The ThreadedQueryHandler decorator provides such a processing pattern.
server | a reference to the "parent" query-server that triggers this handler callback; can be used to provide the query-answer |
id | the query-id can be used to provide the query answer |
request | the request itself |
Implemented in SmartACE::StateSlaveHandler, and SmartACE::WiringHandler.