TypedRest for Java
|
REST endpoint, i.e. More...
Public Member Functions | |
URI | getUri () |
The HTTP URI of the remote resource. More... | |
Executor | getExecutor () |
The REST executor used to communicate with the remote resource. More... | |
ObjectMapper | getSerializer () |
Controls the serialization of entities sent to and received from the server. More... | |
Set< URI > | getLinks (String rel) |
Retrieves all links with a specific relation type cached from the last request. More... | |
Map< URI, String > | getLinksWithTitles (String rel) |
Retrieves all links (with titles) with a specific relation type cached from the last request. More... | |
URI | link (String rel) |
Retrieves a single link with a specific relation type. More... | |
UriTemplate | linkTemplate (String rel) |
Retrieves a link template with a specific relation type. More... | |
default URI | linkTemplate (String rel, String variableName, Object value) |
Retrieves a link template with a specific relation type and resolves it. More... | |
REST endpoint, i.e.
a remote HTTP resource.
Executor net.typedrest.Endpoint.getExecutor | ( | ) |
The REST executor used to communicate with the remote resource.
Set<URI> net.typedrest.Endpoint.getLinks | ( | String | rel | ) |
Retrieves all links with a specific relation type cached from the last request.
rel | The relation type of the links to look for. |
Implemented in net.typedrest.AbstractEndpoint.
Map<URI, String> net.typedrest.Endpoint.getLinksWithTitles | ( | String | rel | ) |
Retrieves all links (with titles) with a specific relation type cached from the last request.
rel | The relation type of the links to look for. |
null
). Implemented in net.typedrest.AbstractEndpoint.
ObjectMapper net.typedrest.Endpoint.getSerializer | ( | ) |
Controls the serialization of entities sent to and received from the server.
URI net.typedrest.Endpoint.getUri | ( | ) |
The HTTP URI of the remote resource.
URI net.typedrest.Endpoint.link | ( | String | rel | ) |
Retrieves a single link with a specific relation type.
Uses cached data from last response if possible. Tries lazy lookup with HTTP HEAD on cache miss.
rel | The relation type of the link to look for. |
RuntimeException | No link with the specified relation type could be found. |
Implemented in net.typedrest.AbstractEndpoint.
UriTemplate net.typedrest.Endpoint.linkTemplate | ( | String | rel | ) |
Retrieves a link template with a specific relation type.
Uses cached data from last response if possible. Tries lazy lookup with HTTP HEAD on cache miss.
rel | The relation type of the template to look for. |
RuntimeException | No link template with the specified relation type could be found. |
Implemented in net.typedrest.AbstractEndpoint.
default URI net.typedrest.Endpoint.linkTemplate | ( | String | rel, |
String | variableName, | ||
Object | value | ||
) |
Retrieves a link template with a specific relation type and resolves it.
rel | The relation type of the template to look for. |
variableName | The name of the variable to insert. |
value | The value to insert for the variable. |
RuntimeException | No link template with the specified relation type could be found. |