org.ros.master.uri
Interface MasterUriProvider

All Known Implementing Classes:
StaticMasterUriProvider, SwitchableMasterUriProvider

public interface MasterUriProvider

Provides URLs for a ROS master.


Method Summary
 java.net.URI getMasterUri()
          Get a master URI.
 java.net.URI getMasterUri(long timeout, java.util.concurrent.TimeUnit unit)
          Get a master URI within a given amount of time.
 

Method Detail

getMasterUri

java.net.URI getMasterUri()
                          throws RosRuntimeException
Get a master URI.

There is no guarantee that calling this class twice will provide the same URI.

This call may or may not block until a URI is available.

Returns:
a master URI
Throws:
RosRuntimeException - this exception may or may not be thrown if there is no master URI available

getMasterUri

java.net.URI getMasterUri(long timeout,
                          java.util.concurrent.TimeUnit unit)
Get a master URI within a given amount of time.

There is no guarantee that calling this class twice will provide the same URI.

This call may or may not block until a URI is available.

Parameters:
timeout - the amount of time to wait for a URI
unit - the time unit for the wait time
Returns:
a master URI or null if none could be obtained within the timeout