Class DiscoveredResource

java.lang.Object
org.springframework.cloud.client.hypermedia.DiscoveredResource
All Implemented Interfaces:
RemoteResource

public class DiscoveredResource extends Object implements RemoteResource
A REST resource that is defined by a service reference and a traversal operation within that service.
Author:
Oliver Gierke
  • Constructor Details

  • Method Details

    • getProvider

      public ServiceInstanceProvider getProvider()
    • getTraversal

      public TraversalDefinition getTraversal()
    • getRestOperations

      public org.springframework.web.client.RestOperations getRestOperations()
    • setRestOperations

      public void setRestOperations(org.springframework.web.client.RestOperations restOperations)
      Configures the RestOperations to use to execute the traversal and verifying HEAD calls.
      Parameters:
      restOperations - Can be null; resorts to a default RestTemplate in that case.
    • getLink

      public org.springframework.hateoas.Link getLink()
      Description copied from interface: RemoteResource
      Returns the Link to the resource if it is available, or null if it is gone (i.e. it either is generally unavailable or can't be discovered).
      Specified by:
      getLink in interface RemoteResource
      Returns:
      a link to the resource.
    • setLink

      public void setLink(org.springframework.hateoas.Link link)
    • verifyOrDiscover

      public void verifyOrDiscover()
      Verifies the link to the current.
      Specified by:
      verifyOrDiscover in interface RemoteResource