RTI Connext Java API Version 7.1.0
SimpleReplierListener< TReq, TRep > Interface Template Reference

The listener called by a SimpleReplier. More...

Inherits EventListener.

Inherited by RequestReplyHowTo.MySimpleReplierListener.

Public Member Functions

TRep onRequestAvailable (Sample< TReq > request)
 User callback that receives a request and provides a reply. More...
 
void returnLoan (TRep reply)
 Returns a previously generated reply to the user. More...
 

Detailed Description

The listener called by a SimpleReplier.

See also
com.rti.connext.requestreply.SimpleReplier<TReq,TRep>
SimpleReplier example

Member Function Documentation

◆ onRequestAvailable()

TRep onRequestAvailable ( Sample< TReq >  request)

User callback that receives a request and provides a reply.

This operation gets called when a request is available and expects a reply that is automatically sent. Immediately after that, returnLoan is called.

Parameters
requestThe received request
Returns
A reply for that request

◆ returnLoan()

void returnLoan ( TRep  reply)

Returns a previously generated reply to the user.

This operation is always called right after sending the reply created by onRequestAvailable. It can be used to release any resources from the reply creation. If there are no resources to release, the implementation body can be empty.

Parameters
replyThe reply previously provided in onRequestAvailable