public class Traverson extends Object
https://github.com/basti1302/traverson| Modifier and Type | Class and Description |
|---|---|
class |
Traverson.TraversalBuilder
Builder API to customize traversals.
|
| Constructor and Description |
|---|
Traverson(URI baseUri,
List<MediaType> mediaTypes)
|
Traverson(URI baseUri,
MediaType... mediaTypes)
|
| Modifier and Type | Method and Description |
|---|---|
Traverson.TraversalBuilder |
follow(Hop hop)
Sets up a
Traverson.TraversalBuilder for a single rel with customized details. |
Traverson.TraversalBuilder |
follow(String... rels)
Sets up a
Traverson.TraversalBuilder to follow the given rels. |
static List<HttpMessageConverter<?>> |
getDefaultMessageConverters(MediaType... mediaTypes)
Returns all
HttpMessageConverters that will be registered for the given MediaTypes by default. |
Traverson |
setLinkDiscoverers(List<? extends LinkDiscoverer> discoverer)
Sets the
LinkDiscoverers to use. |
Traverson |
setRestOperations(RestOperations operations)
Configures the
RestOperations to use. |
public Traverson(URI baseUri, MediaType... mediaTypes)
Traverson interacting with the given base URI and using the given MediaTypes to
interact with the service.baseUri - must not be null.mediaTypes - must not be null or empty.public static List<HttpMessageConverter<?>> getDefaultMessageConverters(MediaType... mediaTypes)
HttpMessageConverters that will be registered for the given MediaTypes by default.mediaTypes - must not be null.public Traverson setRestOperations(@Nullable RestOperations operations)
RestOperations to use. If null is provided a default RestTemplate will be
used.operations - public Traverson setLinkDiscoverers(@Nullable List<? extends LinkDiscoverer> discoverer)
LinkDiscoverers to use. By default a single HalLinkDiscoverer is registered. If
null is provided the default is reapplied.discoverer - can be null.public Traverson.TraversalBuilder follow(String... rels)
Traverson.TraversalBuilder to follow the given rels.rels - must not be null or empty.Traverson.TraversalBuilderpublic Traverson.TraversalBuilder follow(Hop hop)
Traverson.TraversalBuilder for a single rel with customized details.hop - must not be nullCopyright © 2012-2019–2019 Pivotal, Inc.. All rights reserved.