org.ros.node.service
Interface ServiceClient<T,S>

Type Parameters:
T - the ServiceServer responds to requests of this type
S - the ServiceServer returns responses of this type
All Known Implementing Classes:
DefaultServiceClient

public interface ServiceClient<T,S>

Provides a connection to a ROS service.


Method Summary
 void call(T request, ServiceResponseListener<S> listener)
          Calls a method on the ServiceServer.
 void connect(java.net.URI uri)
          Connects to a ServiceServer.
 GraphName getName()
           
 T newMessage()
           
 void shutdown()
          Stops the client (e.g.
 

Method Detail

connect

void connect(java.net.URI uri)
Connects to a ServiceServer.

Parameters:
uri - the URI of the ServiceServer to connect to

call

void call(T request,
          ServiceResponseListener<S> listener)
Calls a method on the ServiceServer.

Parameters:
request - the request message
listener - the ServiceResponseListener that will handle the response to this request

getName

GraphName getName()
Returns:
the name of the service this ServiceClient is connected to

shutdown

void shutdown()
Stops the client (e.g. disconnect a persistent service connection).


newMessage

T newMessage()
Returns:
a new request message