public class DiscoveredResource extends Object implements RemoteResource
| Constructor and Description |
|---|
DiscoveredResource(ServiceInstanceProvider provider,
TraversalDefinition traversal) |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.hateoas.Link |
getLink()
Returns the
Link to the resource in case it is available or null
in case it's gone, i.e. |
ServiceInstanceProvider |
getProvider() |
org.springframework.web.client.RestOperations |
getRestOperations() |
TraversalDefinition |
getTraversal() |
void |
setLink(org.springframework.hateoas.Link link) |
void |
setRestOperations(org.springframework.web.client.RestOperations restOperations)
Configures the
RestOperations to use to execute the traversal and verifying HEAD calls. |
void |
verifyOrDiscover()
Verifies the link to the current
|
public DiscoveredResource(ServiceInstanceProvider provider, TraversalDefinition traversal)
public void setRestOperations(org.springframework.web.client.RestOperations restOperations)
RestOperations to use to execute the traversal and verifying HEAD calls.restOperations - can be null, resorting to a default RestTemplate in that case.public ServiceInstanceProvider getProvider()
public TraversalDefinition getTraversal()
public org.springframework.web.client.RestOperations getRestOperations()
public org.springframework.hateoas.Link getLink()
RemoteResourceLink to the resource in case it is available or null
in case it's gone, i.e. either generally unavailable or can't be discovered.getLink in interface RemoteResourcepublic void setLink(org.springframework.hateoas.Link link)
public void verifyOrDiscover()
verifyOrDiscover in interface RemoteResourceCopyright © 2018 Pivotal Software, Inc.. All rights reserved.