CoreDX DDS Java Reference Manual
Public Member Functions | List of all members
Replier< TReq extends RequestType, TRep extends ReplyType > Class Template Reference
Inheritance diagram for Replier< TReq extends RequestType, TRep extends ReplyType >:
ReplierBase RPCEntity

Public Member Functions

 Replier (Class< TReq > treq_clazz, Class< TRep > trep_clazz, ReplierParams r_params)
 
void close ()
 
boolean is_null ()
 
void send_reply (TRep reply, SampleIdentity_t related_request_id)
 
boolean receive_request (Sample< TReq > request, Duration_t max_wait)
 
LoanedSamples< TReq > receive_requests (Duration_t max_wait)
 
LoanedSamples< TReq > receive_requests (int min_request_count, int max_request_count, Duration_t max_wait)
 
boolean wait_for_requests (Duration_t max_wait)
 
boolean wait_for_requests (int min_count, Duration_t max_wait)
 
boolean take_request (Sample< TReq > request)
 
LoanedSamples< TReq > take_requests (int max_samples)
 
boolean read_request (Sample< TReq > request)
 
LoanedSamples< TReq > read_requests (int max_samples)
 
ReplierParams get_replier_params ()
 
boolean receive_nondata_samples (boolean enable)
 
DataReaderI< TReq > get_request_datareader ()
 
DataWriterI< TRep > get_reply_datawriter ()
 

Detailed Description

A replier receives requests and send replies.

An instance of Replier is configured at the time of construction using ReplierParams, which is a container of configuration parameters such as domain participant, QoS, listeners and more.

Replier allows listener-based and polling-based reception of requests.

SimpleReplierListener and ReplierListener interfaces enable call-back based notification when a request is available. On the other hand, Replier provides functions to allow polling reception of requests.

Constructor & Destructor Documentation

Replier ( Class< TReq >  treq_clazz,
Class< TRep >  trep_clazz,
ReplierParams  r_params 
)

Constructor that accepts ReplierParams configuration.

Member Function Documentation

void close ( )

Release the underlying resources including any DDS entities.

The RPCEntity will no longer be useful and will not participate in any communication.

Implements RPCEntity.

ReplierParams get_replier_params ( )

Access the ReplierParams values that define the configuration of the Replier.

DataWriterI<TRep> get_reply_datawriter ( )

Access the underlying DataWriter used to send Replies.

DataReaderI<TReq> get_request_datareader ( )

Access the underlying DataReader used to receive Requests.

boolean is_null ( )

Indicates if the entity has been 'closed'.

If is_null() is true, then the underlying dds entities have been released and the RPCEntity is no longer useful for operations.

Implements RPCEntity.

boolean read_request ( Sample< TReq >  request)

Attempt to access the next request.

This may will block until a request is available.

Return values
trueif able to access a request.
falseotherwise
LoanedSamples<TReq> read_requests ( int  max_samples)

Attempt to access up to 'max_samples' requests.

This call may block if no requests are available.

Return values
collectionof requests
boolean receive_nondata_samples ( boolean  enable)

Toggle the underlying entities to deliver non-data samples to the application

Not Yet Supported:
boolean receive_request ( Sample< TReq >  request,
Duration_t  max_wait 
)

Attempt to access the next request.

This may block for up to 'max_wait' if no request is immediately available.

LoanedSamples<TReq> receive_requests ( Duration_t  max_wait)

Attempt to access any available requests.

This may block for up to 'max_wait' if no requests are immediately available.

LoanedSamples<TReq> receive_requests ( int  min_request_count,
int  max_request_count,
Duration_t  max_wait 
)

Attempt to access up to 'max_request_count' requests.

This may block for up to 'max_wait' if there are not at least 'min_request_count' requests immediately available.

void send_reply ( TRep  reply,
SampleIdentity_t  related_request_id 
)

Sends the provided 'reply' associated with 'related_request_id'.

boolean take_request ( Sample< TReq >  request)

Attempt to access the next request.

This call will not block.

Return values
trueif able to access a request.
falseotherwise
LoanedSamples<TReq> take_requests ( int  max_samples)

Attempt to access up to 'max_samples' requests.

This call will not block.

Return values
collectionof requests (possibly empty)
boolean wait_for_requests ( Duration_t  max_wait)

Block until at least one request is available.

This may block for up to 'max_wait'.

boolean wait_for_requests ( int  min_count,
Duration_t  max_wait 
)

Block until at least 'min_count requests available.

This may block for up to 'max_wait'.


© 2009-2017 Twin Oaks Computing, Inc
Castle Rock, CO 80108
All rights reserved.