where T
is the Java type, or
using GenericType
where the generic parameter is the Java type.
Any Java type instance for a request entity, that is supported by the client
configuration of the client, can be passed. If generic information is
required then an instance of GenericEntity
may
be used.
A type of ClientResponse
declared for the response entity
may be used to obtain the status, headers and response entity. If any other
type is declared then and the response status is greater than or equal to
300 then a UniformInterfaceException
exception will be thrown, from
which the ClientResponse
instance can be accessed.
- Author:
- Paul.Sandoz@Sun.Com
Method Summary |
void |
delete()
Invoke the DELETE method with no request entity or response. |
|
delete(java.lang.Class<T> c)
Invoke the DELETE method with no request entity that returns a response. |
|
delete(java.lang.Class<T> c,
java.lang.Object requestEntity)
Invoke the DELETE method with a request entity that returns a response. |
|
delete(GenericType<T> gt)
Invoke the DELETE method with a request entity that returns a response. |
|
delete(GenericType<T> gt,
java.lang.Object requestEntity)
Invoke the DELETE method with a request entity that returns a response. |
void |
delete(java.lang.Object requestEntity)
Invoke the DELETE method with a request entity but no response. |
|
get(java.lang.Class<T> c)
Invoke the GET method. |
|
get(GenericType<T> gt)
Invoke the GET method. |
ClientResponse |
head()
Invoke the HEAD method. |
void |
method(java.lang.String method)
Invoke a HTTP method with no request entity or response. |
|
method(java.lang.String method,
java.lang.Class<T> c)
Invoke a HTTP method with no request entity that returns a response. |
|
method(java.lang.String method,
java.lang.Class<T> c,
java.lang.Object requestEntity)
Invoke a HTTP method with a request entity that returns a response. |
|
method(java.lang.String method,
GenericType<T> gt)
Invoke a HTTP method with no request entity that returns a response. |
|
method(java.lang.String method,
GenericType<T> gt,
java.lang.Object requestEntity)
Invoke a HTTP method with a request entity that returns a response. |
void |
method(java.lang.String method,
java.lang.Object requestEntity)
Invoke a HTTP method with a request entity but no response. |
|
options(java.lang.Class<T> c)
Invoke the OPTIONS method. |
|
options(GenericType<T> gt)
Invoke the OPTIONS method. |
void |
post()
Invoke the POST method with no request entity or response. |
|
post(java.lang.Class<T> c)
Invoke the POST method with no request entity that returns a response. |
|
post(java.lang.Class<T> c,
java.lang.Object requestEntity)
Invoke the POST method with a request entity that returns a response. |
|
post(GenericType<T> gt)
Invoke the POST method with a request entity that returns a response. |
|
post(GenericType<T> gt,
java.lang.Object requestEntity)
Invoke the POST method with a request entity that returns a response. |
void |
post(java.lang.Object requestEntity)
Invoke the POST method with a request entity but no response. |
void |
put()
Invoke the PUT method with no request entity or response. |
|
put(java.lang.Class<T> c)
Invoke the PUT method with no request entity that returns a response. |
|
put(java.lang.Class<T> c,
java.lang.Object requestEntity)
Invoke the PUT method with a request entity that returns a response. |
|
put(GenericType<T> gt)
Invoke the PUT method with a request entity that returns a response. |
|
put(GenericType<T> gt,
java.lang.Object requestEntity)
Invoke the PUT method with a request entity that returns a response. |
void |
put(java.lang.Object requestEntity)
Invoke the PUT method with a request entity but no response. |
head
ClientResponse head()
- Invoke the HEAD method.
- Returns:
- the HTTP response.
options
<T> T options(java.lang.Class<T> c)
throws UniformInterfaceException
- Invoke the OPTIONS method.
- Type Parameters:
T
- the type of the response.- Parameters:
c
- the type of the returned response.
- Returns:
- an instance of type
c
.
- Throws:
UniformInterfaceException
- if the status of the HTTP response is
greater than or equal to 300 and c is not the type
ClientResponse
.
options
<T> T options(GenericType<T> gt)
throws UniformInterfaceException
- Invoke the OPTIONS method.
- Type Parameters:
T
- the type of the response.- Parameters:
gt
- the generic type of the returned response.
- Returns:
- an instance of type represented by the generic type.
- Throws:
UniformInterfaceException
- if the status of the HTTP response is
greater than or equal to 300 and gt does not
represent the type ClientResponse
.
get
<T> T get(java.lang.Class<T> c)
throws UniformInterfaceException
- Invoke the GET method.
- Type Parameters:
T
- the type of the response.- Parameters:
c
- the type of the returned response.
- Returns:
- an instance of type
c
.
- Throws:
UniformInterfaceException
- if the status of the HTTP response is
greater than or equal to 300 and c is not the type
ClientResponse
.
get
<T> T get(GenericType<T> gt)
throws UniformInterfaceException
- Invoke the GET method.
- Type Parameters:
T
- the type of the response.- Parameters:
gt
- the generic type of the returned response.
- Returns:
- an instance of type represented by the generic type.
- Throws:
UniformInterfaceException
- if the status of the HTTP response is
greater than or equal to 300 and gt does not
represent the type ClientResponse
.
put
void put()
throws UniformInterfaceException
- Invoke the PUT method with no request entity or response.
If the status code is less than 300 and a representation is present
then that representation is ignored.
- Throws:
UniformInterfaceException
- if the status of the HTTP response is
greater than or equal to 300.
put
void put(java.lang.Object requestEntity)
throws UniformInterfaceException
- Invoke the PUT method with a request entity but no response.
If the status code is less than 300 and a representation is present
then that representation is ignored.
- Parameters:
requestEntity
- the request entity.
- Throws:
UniformInterfaceException
- if the status of the HTTP response is
greater than or equal to 300.
put
<T> T put(java.lang.Class<T> c)
throws UniformInterfaceException
- Invoke the PUT method with no request entity that returns a response.
- Type Parameters:
T
- the type of the response.- Parameters:
c
- the type of the returned response.
- Returns:
- an instance of type
c
.
- Throws:
UniformInterfaceException
- if the status of the HTTP response is
greater than or equal to 300 and c is not the type
ClientResponse
.
put
<T> T put(GenericType<T> gt)
throws UniformInterfaceException
- Invoke the PUT method with a request entity that returns a response.
- Type Parameters:
T
- the type of the response.- Parameters:
gt
- the generic type of the returned response.
- Returns:
- an instance of type represented by the generic type.
- Throws:
UniformInterfaceException
- if the status of the HTTP response is
greater than or equal to 300 and gt does not
represent the type ClientResponse
.
put
<T> T put(java.lang.Class<T> c,
java.lang.Object requestEntity)
throws UniformInterfaceException
- Invoke the PUT method with a request entity that returns a response.
- Type Parameters:
T
- the type of the response.- Parameters:
c
- the type of the returned response.requestEntity
- the request entity.
- Returns:
- an instance of type
c
.
- Throws:
UniformInterfaceException
- if the status of the HTTP response is
greater than or equal to 300 and c is not the type
ClientResponse
.
put
<T> T put(GenericType<T> gt,
java.lang.Object requestEntity)
throws UniformInterfaceException
- Invoke the PUT method with a request entity that returns a response.
- Type Parameters:
T
- the type of the response.- Parameters:
gt
- the generic type of the returned response.requestEntity
- the request entity.
- Returns:
- an instance of type represented by the generic type.
- Throws:
UniformInterfaceException
- if the status of the HTTP response is
greater than or equal to 300 and gt does not
represent the type ClientResponse
.
post
void post()
throws UniformInterfaceException
- Invoke the POST method with no request entity or response.
If the status code is less than 300 and a representation is present
then that representation is ignored.
- Throws:
UniformInterfaceException
- if the status of the HTTP response is
greater than or equal to 300.
post
void post(java.lang.Object requestEntity)
throws UniformInterfaceException
- Invoke the POST method with a request entity but no response.
If the status code is less than 300 and a representation is present
then that representation is ignored.
- Parameters:
requestEntity
- the request entity.
- Throws:
UniformInterfaceException
- if the status of the HTTP response is
greater than or equal to 300.
post
<T> T post(java.lang.Class<T> c)
throws UniformInterfaceException
- Invoke the POST method with no request entity that returns a response.
- Type Parameters:
T
- the type of the response.- Parameters:
c
- the type of the returned response.
- Returns:
- an instance of type
c
.
- Throws:
UniformInterfaceException
- if the status of the HTTP response is
greater than or equal to 300 and c is not the type
ClientResponse
.
post
<T> T post(GenericType<T> gt)
throws UniformInterfaceException
- Invoke the POST method with a request entity that returns a response.
- Type Parameters:
T
- the type of the response.- Parameters:
gt
- the generic type of the returned response.
- Returns:
- an instance of type represented by the generic type.
- Throws:
UniformInterfaceException
- if the status of the HTTP response is
greater than or equal to 300 and gt does not
represent the type ClientResponse
.
post
<T> T post(java.lang.Class<T> c,
java.lang.Object requestEntity)
throws UniformInterfaceException
- Invoke the POST method with a request entity that returns a response.
- Type Parameters:
T
- the type of the response.- Parameters:
c
- the type of the returned response.requestEntity
- the request entity.
- Returns:
- an instance of type
c
.
- Throws:
UniformInterfaceException
- if the status of the HTTP response is
greater than or equal to 300 and c is not the type
ClientResponse
.
post
<T> T post(GenericType<T> gt,
java.lang.Object requestEntity)
throws UniformInterfaceException
- Invoke the POST method with a request entity that returns a response.
- Type Parameters:
T
- the type of the response.- Parameters:
gt
- the generic type of the returned response.requestEntity
- the request entity.
- Returns:
- an instance of type represented by the generic type.
- Throws:
UniformInterfaceException
- if the status of the HTTP response is
greater than or equal to 300 and gt does not
represent the type ClientResponse
.
delete
void delete()
throws UniformInterfaceException
- Invoke the DELETE method with no request entity or response.
If the status code is less than 300 and a representation is present
then that representation is ignored.
- Throws:
UniformInterfaceException
- if the status of the HTTP response is
greater than or equal to 300.
delete
void delete(java.lang.Object requestEntity)
throws UniformInterfaceException
- Invoke the DELETE method with a request entity but no response.
If the status code is less than 300 and a representation is present
then that representation is ignored.
- Parameters:
requestEntity
- the request entity.
- Throws:
UniformInterfaceException
- if the status of the HTTP response is
greater than or equal to 300.
delete
<T> T delete(java.lang.Class<T> c)
throws UniformInterfaceException
- Invoke the DELETE method with no request entity that returns a response.
- Type Parameters:
T
- the type of the response.- Parameters:
c
- the type of the returned response.
- Returns:
- an instance of type
c
.
- Throws:
UniformInterfaceException
- if the status of the HTTP response is
greater than or equal to 300 and c is not the type
ClientResponse
.
delete
<T> T delete(GenericType<T> gt)
throws UniformInterfaceException
- Invoke the DELETE method with a request entity that returns a response.
- Type Parameters:
T
- the type of the response.- Parameters:
gt
- the generic type of the returned response.
- Returns:
- an instance of type represented by the generic type.
- Throws:
UniformInterfaceException
- if the status of the HTTP response is
greater than or equal to 300 and gt does not
represent the type ClientResponse
.
delete
<T> T delete(java.lang.Class<T> c,
java.lang.Object requestEntity)
throws UniformInterfaceException
- Invoke the DELETE method with a request entity that returns a response.
- Type Parameters:
T
- the type of the response.- Parameters:
c
- the type of the returned response.requestEntity
- the request entity.
- Returns:
- an instance of type
c
.
- Throws:
UniformInterfaceException
- if the status of the HTTP response is
greater than or equal to 300 and c is not the type
ClientResponse
.
delete
<T> T delete(GenericType<T> gt,
java.lang.Object requestEntity)
throws UniformInterfaceException
- Invoke the DELETE method with a request entity that returns a response.
- Type Parameters:
T
- the type of the response.- Parameters:
gt
- the generic type of the returned response.requestEntity
- the request entity.
- Returns:
- an instance of type represented by the generic type.
- Throws:
UniformInterfaceException
- if the status of the HTTP response is
greater than or equal to 300 and gt does not
represent the type ClientResponse
.
method
void method(java.lang.String method)
throws UniformInterfaceException
- Invoke a HTTP method with no request entity or response.
If the status code is less than 300 and a representation is present
then that representation is ignored.
- Parameters:
method
- the HTTP method.
- Throws:
UniformInterfaceException
- if the status of the HTTP response is
greater than or equal to 300.
method
void method(java.lang.String method,
java.lang.Object requestEntity)
throws UniformInterfaceException
- Invoke a HTTP method with a request entity but no response.
If the status code is less than 300 and a representation is present
then that representation is ignored.
- Parameters:
method
- the HTTP method.requestEntity
- the request entity.
- Throws:
UniformInterfaceException
- if the status of the HTTP response is
greater than or equal to 300.
method
<T> T method(java.lang.String method,
java.lang.Class<T> c)
throws UniformInterfaceException
- Invoke a HTTP method with no request entity that returns a response.
- Type Parameters:
T
- the type of the response.- Parameters:
method
- the HTTP method.c
- the type of the returned response.
- Returns:
- an instance of type
c
.
- Throws:
UniformInterfaceException
- if the status of the HTTP response is
greater than or equal to 300 and c is not the type
ClientResponse
.
method
<T> T method(java.lang.String method,
GenericType<T> gt)
throws UniformInterfaceException
- Invoke a HTTP method with no request entity that returns a response.
- Type Parameters:
T
- the type of the response.- Parameters:
method
- the HTTP method.gt
- the generic type of the returned response.
- Returns:
- an instance of type represented by the generic type.
- Throws:
UniformInterfaceException
- if the status of the HTTP response is
greater than or equal to 300 and gt does not
represent the type ClientResponse
.
method
<T> T method(java.lang.String method,
java.lang.Class<T> c,
java.lang.Object requestEntity)
throws UniformInterfaceException
- Invoke a HTTP method with a request entity that returns a response.
- Type Parameters:
T
- the type of the response.- Parameters:
method
- the HTTP method.c
- the type of the returned response.requestEntity
- the request entity.
- Returns:
- an instance of type
c
.
- Throws:
UniformInterfaceException
- if the status of the HTTP response is
greater than or equal to 300 and c is not the type
ClientResponse
.
method
<T> T method(java.lang.String method,
GenericType<T> gt,
java.lang.Object requestEntity)
throws UniformInterfaceException
- Invoke a HTTP method with a request entity that returns a response.
- Type Parameters:
T
- the type of the response.- Parameters:
method
- the HTTP method.gt
- the generic type of the returned response.requestEntity
- the request entity.
- Returns:
- an instance of type represented by the generic type.
- Throws:
UniformInterfaceException
- if the status of the HTTP response is
greater than or equal to 300 and gt does not
represent the type ClientResponse
.
Copyright © 2008 Sun Microsystems, Inc. All Rights Reserved.