Interface MasterUriProvider

All Known Implementing Classes:
StaticMasterUriProvider, SwitchableMasterUriProvider

public interface MasterUriProvider
Provides URLs for a ROS master.
Author:
Keith M. Hughes
  • Method Summary

    Modifier and Type
    Method
    Description
    Get a master URI.
    getMasterUri(long timeout, TimeUnit unit)
    Get a master URI within a given amount of time.
  • Method Details

    • getMasterUri

      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

      URI getMasterUri(long timeout, 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