|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Target
A resource target identified by the resource URI.
Method Summary | |
---|---|
Configuration |
configuration()
Get access to the underlying configuration . |
java.net.URI |
getUri()
Get the URI identifying the resource. |
UriBuilder |
getUriBuilder()
Get the URI builder initialized with the URI of the current
resource target. |
Target |
matrixParam(java.lang.String name,
java.lang.Object... values)
Create a new Target instance by appending a matrix parameter to
the existing set of matrix parameters of the current final segment of the
URI of the current target instance. |
Target |
path(java.lang.String path)
Create a new Target instance by appending path to the URI of
the current target instance. |
Target |
pathParam(java.lang.String name,
java.lang.Object value)
Create a new Target instance by replacing existing path parameter
in the URI of the current target instance with a supplied value. |
Target |
pathParams(java.util.Map<java.lang.String,java.lang.Object> parameters)
Create a new Target instance by replacing one or more existing path parameters
in the URI of the current target instance with supplied values. |
Target |
queryParam(java.lang.String name,
java.lang.Object... values)
Create a new Target instance by adding a query parameter to the URI
of the current target instance. |
Target |
queryParams(MultivaluedMap<java.lang.String,java.lang.Object> parameters)
Create a new Target instance by adding one or more query parameters and
respective values to the URI of the current target instance. |
Invocation.Builder |
request()
Start building a request to the targeted web resource. |
Invocation.Builder |
request(MediaType... acceptedResponseTypes)
Start building a request to the targeted web resource and define the accepted response media types. |
Invocation.Builder |
request(java.lang.String... acceptedResponseTypes)
Start building a request to the targeted web resource and define the accepted response media types. |
Method Detail |
---|
java.net.URI getUri()
UriBuilder getUriBuilder()
URI
of the current
resource target. The returned URI builder is detached from the target,
i.e. any updates in the URI builder MUST NOT have any effects on the
URI of the originating target.
Configuration configuration()
configuration
.
Target path(java.lang.String path) throws java.lang.NullPointerException
Target
instance by appending path to the URI of
the current target instance.
When constructing the final path, a '/' separator will be inserted between
the existing path and the supplied path if necessary. Existing '/' characters
are preserved thus a single value can represent multiple URI path segments.
A snapshot of the present configuration of the current (parent) target
instance is taken and is inherited by the newly constructed (child) target
instance.
path
- the path, may contain URI template parameters.
java.lang.NullPointerException
- if path is null.Target pathParam(java.lang.String name, java.lang.Object value) throws java.lang.IllegalArgumentException, java.lang.NullPointerException
Target
instance by replacing existing path parameter
in the URI of the current target instance with a supplied value.
A snapshot of the present configuration of the current (parent) target
instance is taken and is inherited by the newly constructed (child) target
instance.
name
- path parameter template name.value
- value to be used to replace the template.
java.lang.IllegalArgumentException
- if there is no such path parameter.
java.lang.NullPointerException
- if name or value is null.Target pathParams(java.util.Map<java.lang.String,java.lang.Object> parameters) throws java.lang.IllegalArgumentException, java.lang.NullPointerException
Target
instance by replacing one or more existing path parameters
in the URI of the current target instance with supplied values.
A snapshot of the present configuration of the current (parent) target
instance is taken and is inherited by the newly constructed (child) target
instance.
parameters
- a map of URI template parameter names and values.
java.lang.IllegalArgumentException
- if the supplied map is empty.
java.lang.NullPointerException
- if the parameter map or any of the names or values is null.Target matrixParam(java.lang.String name, java.lang.Object... values) throws java.lang.NullPointerException
Target
instance by appending a matrix parameter to
the existing set of matrix parameters of the current final segment of the
URI of the current target instance. If multiple values are supplied
the parameter will be added once per value. Note that the matrix parameters
are tied to a particular path segment; appending a value to an existing
matrix parameter name will not affect the position of the matrix parameter
in the URI path.
A snapshot of the present configuration of the current (parent) target
instance is taken and is inherited by the newly constructed (child) target
instance.
name
- the matrix parameter name, may contain URI template parameters.values
- the matrix parameter value(s), each object will be converted
to a String
using its toString()
method. Stringified
values may contain URI template parameters.
java.lang.NullPointerException
- if the name or any of the values is null.Target queryParam(java.lang.String name, java.lang.Object... values) throws java.lang.NullPointerException
Target
instance by adding a query parameter to the URI
of the current target instance. If multiple values are supplied the parameter
will be added once per value.
A snapshot of the present configuration of the current (parent) target
instance is taken and is inherited by the newly constructed (child) target
instance.
name
- the query parameter name, may contain URI template parametersvalues
- the query parameter value(s), each object will be converted
to a String
using its toString()
method. Stringified
values may contain URI template parameters.
java.lang.NullPointerException
- if name or any of the values is null
.Target queryParams(MultivaluedMap<java.lang.String,java.lang.Object> parameters) throws java.lang.IllegalArgumentException, java.lang.NullPointerException
Target
instance by adding one or more query parameters and
respective values to the URI of the current target instance.
A snapshot of the present configuration of the current (parent) target
instance is taken and is inherited by the newly constructed (child) target
instance.
parameters
- a map of query parameter names and values.
java.lang.IllegalArgumentException
- if the supplied map is empty.
java.lang.NullPointerException
- if the parameter map or any of the names or values is null.Invocation.Builder request()
Invocation.Builder request(java.lang.String... acceptedResponseTypes)
acceptedResponseTypes
- accepted response media types.
Invocation.Builder request(MediaType... acceptedResponseTypes)
acceptedResponseTypes
- accepted response media types.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |