Class DiscoveredResource
java.lang.Object
org.springframework.cloud.client.hypermedia.DiscoveredResource
- All Implemented Interfaces:
RemoteResource
A REST resource that is defined by a service reference and a traversal operation within
that service.
- Author:
- Oliver Gierke
-
Constructor Summary
ConstructorsConstructorDescriptionDiscoveredResource(ServiceInstanceProvider provider, TraversalDefinition traversal) -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.hateoas.LinkgetLink()Returns theLinkto the resource if it is available, or null if it is gone (i.e. it either is generally unavailable or can't be discovered).org.springframework.web.client.RestOperationsvoidsetLink(org.springframework.hateoas.Link link) voidsetRestOperations(org.springframework.web.client.RestOperations restOperations) Configures theRestOperationsto use to execute the traversal and verifying HEAD calls.voidVerifies the link to the current.
-
Constructor Details
-
DiscoveredResource
-
-
Method Details
-
getProvider
-
getTraversal
-
getRestOperations
public org.springframework.web.client.RestOperations getRestOperations() -
setRestOperations
public void setRestOperations(org.springframework.web.client.RestOperations restOperations) Configures theRestOperationsto use to execute the traversal and verifying HEAD calls.- Parameters:
restOperations- Can be null; resorts to a defaultRestTemplatein that case.
-
getLink
public org.springframework.hateoas.Link getLink()Description copied from interface:RemoteResourceReturns theLinkto 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:
getLinkin interfaceRemoteResource- 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:
verifyOrDiscoverin interfaceRemoteResource
-