CoreDX Data Distribution Service
The High Performance, Small Footprint DDS from Twin Oaks Computing, Inc
com.toc.coredx.DDS.rpc.ServiceProxy< TReq extends RequestType, TRep extends ReplyType > Class Template Reference
Inheritance diagram for com.toc.coredx.DDS.rpc.ServiceProxy< TReq extends RequestType, TRep extends ReplyType >:
com.toc.coredx.DDS.rpc.RPCEntity

Public Member Functions

void close ()
 
boolean is_null ()
 
void bind (String i_name)
 
void unbind ()
 
boolean is_bound ()
 
String get_bound_instance_name ()
 
Vector< String > get_discovered_service_instances ()
 
ReturnCode_t wait_for_service ()
 
ReturnCode_t wait_for_service (Duration_t maxWait)
 
ReturnCode_t wait_for_service (String instanceName)
 
ReturnCode_t wait_for_service (Duration_t max_wait, String instanceName)
 
ReturnCode_t wait_for_services (int count)
 
ReturnCode_t wait_for_services (Duration_t max_wait, int count)
 
ReturnCode_t wait_for_services (Vector< String > instanceNames)
 
ReturnCode_t wait_for_services (Duration_t max_wait, Vector< String > instanceNames)
 

Detailed Description

ServiceProxy

ServiceProxy class defines type-independent operations for Requester and the Client. For example, binding to a specific instance, waiting for an instance to discover, closing the service, and more. ServiceProxy shall not be instantiated directly.

Member Function Documentation

◆ bind()

void com.toc.coredx.DDS.rpc.ServiceProxy< TReq extends RequestType, TRep extends ReplyType >.bind ( String  i_name)

Bind the ServiceProxy to service(s) with the provided 'instance_name'.

The ServiceProxy will communicate only with services that have a matching 'instance_name'.

◆ close()

void com.toc.coredx.DDS.rpc.ServiceProxy< TReq extends RequestType, TRep extends ReplyType >.close ( )

Release the underlying resources including any DDS entities.

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

Implements com.toc.coredx.DDS.rpc.RPCEntity.

◆ get_bound_instance_name()

String com.toc.coredx.DDS.rpc.ServiceProxy< TReq extends RequestType, TRep extends ReplyType >.get_bound_instance_name ( )

Provides the instance_name to which the ServiceProxy is currently bound.

◆ get_discovered_service_instances()

Vector<String> com.toc.coredx.DDS.rpc.ServiceProxy< TReq extends RequestType, TRep extends ReplyType >.get_discovered_service_instances ( )

Access a list of instance_names that have been discovered by the ServiceProxy.

The returned list is a snapshot in time of the currently known services.

◆ is_bound()

boolean com.toc.coredx.DDS.rpc.ServiceProxy< TReq extends RequestType, TRep extends ReplyType >.is_bound ( )

Indicates if the ServiceProxy is currently bound to a particular instance_name.

◆ is_null()

boolean com.toc.coredx.DDS.rpc.ServiceProxy< TReq extends RequestType, TRep extends ReplyType >.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 com.toc.coredx.DDS.rpc.RPCEntity.

◆ unbind()

void com.toc.coredx.DDS.rpc.ServiceProxy< TReq extends RequestType, TRep extends ReplyType >.unbind ( )

Undo any previous 'bind()' operation.

After this, the ServiceProxy will communicate with any known services.

◆ wait_for_service() [1/4]

ReturnCode_t com.toc.coredx.DDS.rpc.ServiceProxy< TReq extends RequestType, TRep extends ReplyType >.wait_for_service ( )

Block until any service is discovered.

Return values
RETCODE_OK: When matched with requested service[s].

◆ wait_for_service() [2/4]

ReturnCode_t com.toc.coredx.DDS.rpc.ServiceProxy< TReq extends RequestType, TRep extends ReplyType >.wait_for_service ( Duration_t  maxWait)

Block up to 'maxWait' until any service is discovered.

Return values
RETCODE_OK: If matched with requested service[s].
RETCODE_TIMEOUT: If the maxWait time passes without discovering a service.

◆ wait_for_service() [3/4]

ReturnCode_t com.toc.coredx.DDS.rpc.ServiceProxy< TReq extends RequestType, TRep extends ReplyType >.wait_for_service ( String  instanceName)

Wait for a service with matching 'instanceName' to be discovered.

Return values
RETCODE_OK: When matched with requested service[s].

◆ wait_for_service() [4/4]

ReturnCode_t com.toc.coredx.DDS.rpc.ServiceProxy< TReq extends RequestType, TRep extends ReplyType >.wait_for_service ( Duration_t  max_wait,
String  instanceName 
)

Block up to 'maxWait' until a service matching 'instanceNmae' is discovered.

Return values
RETCODE_OK: If matched with requested service[s].
RETCODE_TIMEOUT: If the maxWait time passes without discovering a service.

◆ wait_for_services() [1/4]

ReturnCode_t com.toc.coredx.DDS.rpc.ServiceProxy< TReq extends RequestType, TRep extends ReplyType >.wait_for_services ( int  count)

Block until at least 'count' services have been discovered.

Return values
RETCODE_OK: When matched with requested service[s].

◆ wait_for_services() [2/4]

ReturnCode_t com.toc.coredx.DDS.rpc.ServiceProxy< TReq extends RequestType, TRep extends ReplyType >.wait_for_services ( Duration_t  max_wait,
int  count 
)

Block until at least 'count' services have been discovered or 'maxWait' time elapses.

Return values
RETCODE_OK: If matched with requested service[s].
RETCODE_TIMEOUT: If the maxWait time passes without discovering 'count' services.

◆ wait_for_services() [3/4]

ReturnCode_t com.toc.coredx.DDS.rpc.ServiceProxy< TReq extends RequestType, TRep extends ReplyType >.wait_for_services ( Vector< String >  instanceNames)

Block until discovering a service for each of the listed 'instanceNames'.

Return values
RETCODE_OK: When matched with requested service[s].

◆ wait_for_services() [4/4]

ReturnCode_t com.toc.coredx.DDS.rpc.ServiceProxy< TReq extends RequestType, TRep extends ReplyType >.wait_for_services ( Duration_t  max_wait,
Vector< String >  instanceNames 
)

Block until discovering a service for each of the listed 'instanceNames', or 'maxWait' elapses.

Return values
RETCODE_OK: If matched with requested service[s].
RETCODE_TIMEOUT: If the maxWait time passes without discovering the specified services.

© 2009-2020 Twin Oaks Computing, Inc
Castle Rock, CO 80104
All rights reserved.