CoreDX DDS Java Reference Manual
Public Member Functions | List of all members
ServiceProxy< TReq extends RequestType, TRep extends ReplyType > Class Template Reference
Inheritance diagram for ServiceProxy< TReq extends RequestType, TRep extends ReplyType >:
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

void 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'.

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.

String get_bound_instance_name ( )

Provides the instance_name to which the ServiceProxy is currently bound.

Vector<String> 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.

boolean is_bound ( )

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

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.

void unbind ( )

Undo any previous 'bind()' operation.

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

ReturnCode_t wait_for_service ( )

Block until any service is discovered.

Return values
RETCODE_OK: When matched with requested service[s].
ReturnCode_t 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.
ReturnCode_t 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].
ReturnCode_t 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.
ReturnCode_t wait_for_services ( int  count)

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

Return values
RETCODE_OK: When matched with requested service[s].
ReturnCode_t 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.
ReturnCode_t 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].
ReturnCode_t 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-2017 Twin Oaks Computing, Inc
Castle Rock, CO 80108
All rights reserved.