Class IExchangeBackendInterface
-
template<typename In, typename Out>
class IExchangeBackendInterface : public IComBackendInterface -
A Generic Interface for any service that can be used to exchange messages of type In and Out asynchronously.
- Template Parameters:
-
-
In – The type of message that will be input to this interface
-
Out – The type of message that will be output by this interface
-
Public Functions
- virtual TFuture<const In*> Receive() = 0
-
Initiate an Exchange with the Client.
- Returns:
-
A future that will be fulfilled with the result of the exchange. The value ptr from the future is valid until the next time exchange is called.
- virtual void Respond(Out *Response) = 0
-
Respond to a message from the client.
- Parameters:
-
Response – [in] The message to send to the client
-
template<typename T>
inline TFuture<T*> ReceiveAndDeserialize() -
Do an exchange before converting the protomessage into the specified type.
- Template Parameters:
-
T – The type to deserialize the message into
- Returns:
-
A proto message that has been deserialized from
In
into typeT