Class StaticMasterUriProvider

java.lang.Object
org.ros.master.uri.StaticMasterUriProvider
All Implemented Interfaces:
MasterUriProvider

public class StaticMasterUriProvider extends Object implements MasterUriProvider
A MasterUriProvider which will always return the same URI.
Author:
Keith M. Hughes
  • Constructor Details

    • StaticMasterUriProvider

      public StaticMasterUriProvider(URI uri)
  • Method Details

    • getMasterUri

      public URI getMasterUri()
      Description copied from interface: MasterUriProvider
      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.

      Specified by:
      getMasterUri in interface MasterUriProvider
      Returns:
      a master URI
    • getMasterUri

      public URI getMasterUri(long timeout, TimeUnit unit)
      Description copied from interface: MasterUriProvider
      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.

      Specified by:
      getMasterUri in interface MasterUriProvider
      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