## com.sun.jersey.api.client
Class AsyncWebResource

    java.lang.Object
      com.sun.jersey.api.client.filter.Filterable
          com.sun.jersey.api.client.AsyncWebResource

All Implemented Interfaces:
  AsyncClientHandler, AsyncUniformInterface, RequestBuilder<AsyncWebResource.Builder>

    public class AsyncWebResource

extends Filterable
implements AsyncClientHandler, RequestBuilder<AsyncWebResource.Builder>, AsyncUniformInterface

An encapsulation of an asynchronous Web resource capable of building requests to send to the Web resource and processing responses returned from the Web resource.

An AsyncWebResource instance is obtained from the `Client`.

The Web resource implements the `AsyncUniformInterface` to invoke the HTTP method on the Web resource. A client request may be built before invocation on the uniform interface.

Methods to create a request and return a response are thread-safe. Methods that modify filters are not guaranteed to be thread-safe.

Author:
  Paul.Sandoz@Sun.Com
See Also:
  `com.sun.jersey.api.client`

Nested Class Summary
`class` | `AsyncWebResource.Builder` The builder for building a `ClientRequest` instance and handling the request using the `UniformInterface`.

Constructor Summary
`protected` | `AsyncWebResource(AsyncWebResource that, UriBuilder ub)`
`protected` | `AsyncWebResource(Client c, com.sun.jersey.client.impl.CopyOnWriteHashMap<java.lang.String,java.lang.Object> properties, java.net.URI u)`

Method Summary
`AsyncWebResource.Builder` | `accept(MediaType... types)` Add acceptable media types.
`AsyncWebResource.Builder` | `accept(java.lang.String... types)` Add acceptable media types.
`AsyncWebResource.Builder` | `acceptLanguage(java.util.Locale... locales)` Add acceptable languages
`AsyncWebResource.Builder` | `acceptLanguage(java.lang.String... locales)` Add acceptable languages
`AsyncWebResource.Builder` | `cookie(Cookie cookie)` Add a cookie to be set.
`java.util.concurrent.Future<?>` | `delete()` Invoke the DELETE method with no request entity or response.

`

`<T> java.util.concurrent.Future<T>`

`

`delete(java.lang.Class<T> c)`
Invoke the DELETE method with no request entity that returns a response.

`

`<T> java.util.concurrent.Future<T>`

`

`delete(java.lang.Class<T> c, java.lang.Object requestEntity)`
Invoke the DELETE method with a request entity that returns a response.

`

`<T> java.util.concurrent.Future<T>`

`

`delete(GenericType<T> gt)`
Invoke the DELETE method with a request entity that returns a response.

`

`<T> java.util.concurrent.Future<T>`

`

`delete(GenericType<T> gt, java.lang.Object requestEntity)`
Invoke the DELETE method with a request entity that returns a response.

`

`<T> java.util.concurrent.Future<T>`

`

`delete(ITypeListener<T> l)`
Invoke the DELETE method.

`

`<T> java.util.concurrent.Future<T>`

`

`delete(ITypeListener<T> l, java.lang.Object requestEntity)`
Invoke the DELETE method.

`java.util.concurrent.Future<?>` | `delete(java.lang.Object requestEntity)` Invoke the DELETE method with a request entity but no response.
`AsyncWebResource.Builder` | `entity(java.lang.Object entity)` Set the request entity.
`AsyncWebResource.Builder` | `entity(java.lang.Object entity, MediaType type)` Set the request entity with its media type.
`AsyncWebResource.Builder` | `entity(java.lang.Object entity, java.lang.String type)` Set the request entity with its media type.
`boolean` | `equals(java.lang.Object obj)` Compares this resource to the specified object.

`

`<T> java.util.concurrent.Future<T>`

`

`get(java.lang.Class<T> c)`
Invoke the GET method.

`

`<T> java.util.concurrent.Future<T>`

`

`get(GenericType<T> gt)`
Invoke the GET method.

`

`<T> java.util.concurrent.Future<T>`

`

`get(ITypeListener<T> l)`
Invoke the GET method.

`UriBuilder` | `getBuilder()` Deprecated.
`java.util.Map<java.lang.String,java.lang.Object>` | `getProperties()` Gets WebResource related properties.
`AsyncWebResource.Builder` | `getRequestBuilder()` Get the ClientRequest builder.
`java.net.URI` | `getURI()` Get the URI to the resource.
`UriBuilder` | `getUriBuilder()` Get the URI builder to the resource.
`java.util.concurrent.Future<ClientResponse>` | `handle(ClientRequest request, FutureListener<ClientResponse> l)` Invoke an asynchronous client request.
`int` | `hashCode()` Returns a hash code for this `WebResource`.
`java.util.concurrent.Future<ClientResponse>` | `head()` Invoke the HEAD method.
`java.util.concurrent.Future<ClientResponse>` | `head(ITypeListener<ClientResponse> l)` Invoke the HEAD method.
`AsyncWebResource.Builder` | `header(java.lang.String name, java.lang.Object value)` Add an HTTP header and value.
`java.util.concurrent.Future<?>` | `method(java.lang.String method)` Invoke a HTTP method with no request entity or response.

`

`<T> java.util.concurrent.Future<T>`

`

`method(java.lang.String method, java.lang.Class<T> c)`
Invoke a HTTP method with no request entity that returns a response.

`

`<T> java.util.concurrent.Future<T>`

`

`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.

`

`<T> java.util.concurrent.Future<T>`

`

`method(java.lang.String method, GenericType<T> gt)`
Invoke a HTTP method with no request entity that returns a response.

`

`<T> java.util.concurrent.Future<T>`

`

`method(java.lang.String method, GenericType<T> gt, java.lang.Object requestEntity)`
Invoke a HTTP method with a request entity that returns a response.

`

`<T> java.util.concurrent.Future<T>`

`

`method(java.lang.String method, ITypeListener<T> l)`
Invoke a HTTP method with no request entity that returns a response.

`

`<T> java.util.concurrent.Future<T>`

`

`method(java.lang.String method, ITypeListener<T> l, java.lang.Object requestEntity)`
Invoke a HTTP method with a request entity that returns a response.

`java.util.concurrent.Future<?>` | `method(java.lang.String method, java.lang.Object requestEntity)` Invoke a HTTP method with a request entity but no response.

`

`<T> java.util.concurrent.Future<T>`

`

`options(java.lang.Class<T> c)`
Invoke the OPTIONS method.

`

`<T> java.util.concurrent.Future<T>`

`

`options(GenericType<T> gt)`
Invoke the OPTIONS method.

`

`<T> java.util.concurrent.Future<T>`

`

`options(ITypeListener<T> l)`
Invoke the OPTIONS method.

`AsyncWebResource` | `path(java.lang.String path)` Create a new AsyncWebResource from this web resource with an additional path added to the URI of this web resource.
`java.util.concurrent.Future<?>` | `post()` Invoke the POST method with no request entity or response.

`

`<T> java.util.concurrent.Future<T>`

`

`post(java.lang.Class<T> c)`
Invoke the POST method with no request entity that returns a response.

`

`<T> java.util.concurrent.Future<T>`

`

`post(java.lang.Class<T> c, java.lang.Object requestEntity)`
Invoke the POST method with a request entity that returns a response.

`

`<T> java.util.concurrent.Future<T>`

`

`post(GenericType<T> gt)`
Invoke the POST method with a request entity that returns a response.

`

`<T> java.util.concurrent.Future<T>`

`

`post(GenericType<T> gt, java.lang.Object requestEntity)`
Invoke the POST method with a request entity that returns a response.

`

`<T> java.util.concurrent.Future<T>`

`

`post(ITypeListener<T> l)`
Invoke the POST method.

`

`<T> java.util.concurrent.Future<T>`

`

`post(ITypeListener<T> l, java.lang.Object requestEntity)`
Invoke the POST method.

`java.util.concurrent.Future<?>` | `post(java.lang.Object requestEntity)` Invoke the POST method with a request entity but no response.
`java.util.concurrent.Future<?>` | `put()` Invoke the PUT method with no request entity or response.

`

`<T> java.util.concurrent.Future<T>`

`

`put(java.lang.Class<T> c)`
Invoke the PUT method with no request entity that returns a response.

`

`<T> java.util.concurrent.Future<T>`

`

`put(java.lang.Class<T> c, java.lang.Object requestEntity)`
Invoke the PUT method with a request entity that returns a response.

`

`<T> java.util.concurrent.Future<T>`

`

`put(GenericType<T> gt)`
Invoke the PUT method with a request entity that returns a response.

`

`<T> java.util.concurrent.Future<T>`

`

`put(GenericType<T> gt, java.lang.Object requestEntity)`
Invoke the PUT method with a request entity that returns a response.

`

`<T> java.util.concurrent.Future<T>`

`

`put(ITypeListener<T> l)`
Invoke the PUT method.

`

`<T> java.util.concurrent.Future<T>`

`

`put(ITypeListener<T> l, java.lang.Object requestEntity)`
Invoke the PUT method.

`java.util.concurrent.Future<?>` | `put(java.lang.Object requestEntity)` Invoke the PUT method with a request entity but no response.
`AsyncWebResource` | `queryParam(java.lang.String key, java.lang.String value)` Create a new WebResource from this web resource with an additional query parameter added to the URI of this web resource.
`AsyncWebResource` | `queryParams(MultivaluedMap<java.lang.String,java.lang.String> params)` Create a new WebResource from this web resource with additional query parameters added to the URI of this web resource.
`void` | `setProperty(java.lang.String property, java.lang.Object value)` Sets WebResource related property.
`java.lang.String` | `toString()`
`AsyncWebResource.Builder` | `type(MediaType type)` Set the media type.
`AsyncWebResource.Builder` | `type(java.lang.String type)` Set the media type.
`AsyncWebResource` | `uri(java.net.URI uri)` Create a new AsyncWebResource from this web resource.

Methods inherited from class com.sun.jersey.api.client.filter.Filterable
`addFilter, getHeadHandler, isFilterPresent, isFilterPreset, removeAllFilters, removeFilter`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### AsyncWebResource

    protected AsyncWebResource(Client c,
                               com.sun.jersey.client.impl.CopyOnWriteHashMap<java.lang.String,java.lang.Object> properties,
                               java.net.URI u)

### AsyncWebResource

    protected AsyncWebResource(AsyncWebResource that,
                               UriBuilder ub)

Method Detail

### getURI

    public java.net.URI getURI()

  Get the URI to the resource.

  Returns:
    the URI.

### getBuilder

    @Deprecated
    public UriBuilder getBuilder()

  Deprecated.

  Get the URI builder to the resource.

  Returns:
    the URI builder.

### getUriBuilder

    public UriBuilder getUriBuilder()

  Get the URI builder to the resource.

  Returns:
    the URI builder.

### getRequestBuilder

    public AsyncWebResource.Builder getRequestBuilder()

  Get the ClientRequest builder.

  Returns:
    the ClientRequest builder.

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`
  Returns:
    the URI as a String instance

### hashCode

    public int hashCode()

  Returns a hash code for this `WebResource`.

  The hash code is the hash code of URI of this `WebResource`.

  Overrides:
    `hashCode` in class `java.lang.Object`
  Returns:
    a hash code for this `WebResource`.

### equals

    public boolean equals(java.lang.Object obj)

  Compares this resource to the specified object.

  The result is true if and only if the argument is not null and is a `AsyncWebResource` object whose URI is equal to the URI of this `AsyncWebResource`.

  Overrides:
    `equals` in class `java.lang.Object`
  Parameters:
    `obj` - the object to compare this `AsyncWebResource` against.
  Returns:
    true if the `AsyncWebResource` are equal; false otherwise.

### head

    public java.util.concurrent.Future<ClientResponse> head()

  Description copied from interface: `AsyncUniformInterface`
  Invoke the HEAD method.

  Specified by:
    `head` in interface `AsyncUniformInterface`
  Returns:
    the HTTP response.

### head

    public java.util.concurrent.Future<ClientResponse> head(ITypeListener<ClientResponse> l)

  Description copied from interface: `AsyncUniformInterface`
  Invoke the HEAD method.

  Specified by:
    `head` in interface `AsyncUniformInterface`
  Parameters:
    `l` - the listener to receive asynchronous callbacks.
  Returns:
    a future that may be used to wait until the future completes and obtain the client response state, or cancel the request.

### options

    public <T> java.util.concurrent.Future<T> options(java.lang.Class<T> c)

  Description copied from interface: `AsyncUniformInterface`
  Invoke the OPTIONS method.

  The `Future.get()` method will throw a UniformInterfaceException if the status of the HTTP response is greater than or equal to 300 and `c` is not the type `ClientResponse`.

  Specified by:
    `options` in interface `AsyncUniformInterface`
  Type Parameters:
    `T` - the type of the response.
  Parameters:
    `c` - the type of the returned response.
  Returns:
    an instance of type `c`.

### options

    public <T> java.util.concurrent.Future<T> options(GenericType<T> gt)

  Description copied from interface: `AsyncUniformInterface`
  Invoke the OPTIONS method.

  The `Future.get()` method will throw a UniformInterfaceException if the status of the HTTP response is greater than or equal to 300 and `gt` is not the type `ClientResponse`.

  Specified by:
    `options` in interface `AsyncUniformInterface`
  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.

### options

    public <T> java.util.concurrent.Future<T> options(ITypeListener<T> l)

  Description copied from interface: `AsyncUniformInterface`
  Invoke the OPTIONS method.

  Specified by:
    `options` in interface `AsyncUniformInterface`
  Type Parameters:
    `T` - the type of the response.
  Parameters:
    `l` - the listener to receive asynchronous callbacks.
  Returns:
    a future that may be used to wait until the future completes and obtain the client response state, or cancel the request.

### get

    public <T> java.util.concurrent.Future<T> get(java.lang.Class<T> c)
                                       throws UniformInterfaceException

  Description copied from interface: `AsyncUniformInterface`
  Invoke the GET method.

  The `Future.get()` method will throw a UniformInterfaceException if the status of the HTTP response is greater than or equal to 300 and `c` is not the type `ClientResponse`.

  Specified by:
    `get` in interface `AsyncUniformInterface`
  Type Parameters:
    `T` - the type of the response.
  Parameters:
    `c` - the type of the returned response.
  Returns:
    an instance of type `c`.
  Throws:
    `UniformInterfaceException`

### get

    public <T> java.util.concurrent.Future<T> get(GenericType<T> gt)
                                       throws UniformInterfaceException

  Description copied from interface: `AsyncUniformInterface`
  Invoke the GET method.

  The `Future.get()` method will throw a UniformInterfaceException if the status of the HTTP response is greater than or equal to 300 and `gt` is not the type `ClientResponse`.

  Specified by:
    `get` in interface `AsyncUniformInterface`
  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`

### get

    public <T> java.util.concurrent.Future<T> get(ITypeListener<T> l)

  Description copied from interface: `AsyncUniformInterface`
  Invoke the GET method.

  Specified by:
    `get` in interface `AsyncUniformInterface`
  Type Parameters:
    `T` - the type of the response.
  Parameters:
    `l` - the listener to receive asynchronous callbacks.
  Returns:
    a future that may be used to wait until the future completes and obtain the client response state, or cancel the request.

### put

    public java.util.concurrent.Future<?> put()
                                       throws UniformInterfaceException

  Description copied from interface: `AsyncUniformInterface`
  Invoke the PUT method with no request entity or response.

  If the status of the HTTP response is less than 300 and a representation is present then that representation is ignored.

  The `Future.get()` method will throw a UniformInterfaceException if the status of the HTTP response is greater than or equal to 300.

  Specified by:
    `put` in interface `AsyncUniformInterface`
  Returns:
    a void future.
  Throws:
    `UniformInterfaceException`

### put

    public java.util.concurrent.Future<?> put(java.lang.Object requestEntity)
                                       throws UniformInterfaceException

  Description copied from interface: `AsyncUniformInterface`
  Invoke the PUT method with a request entity but no response.

  If the status of the HTTP response is less than 300 and a representation is present then that representation is ignored.

  The `Future.get()` method will throw a UniformInterfaceException if the status of the HTTP response is greater than or equal to 300.

  Specified by:
    `put` in interface `AsyncUniformInterface`
  Parameters:
    `requestEntity` - the request entity.
  Returns:
    a void future.
  Throws:
    `UniformInterfaceException`

### put

    public <T> java.util.concurrent.Future<T> put(java.lang.Class<T> c)
                                       throws UniformInterfaceException

  Description copied from interface: `AsyncUniformInterface`
  Invoke the PUT method with no request entity that returns a response.

  The `Future.get()` method will throw a UniformInterfaceException if the status of the HTTP response is greater than or equal to 300 and `c` is not the type `ClientResponse`.

  Specified by:
    `put` in interface `AsyncUniformInterface`
  Type Parameters:
    `T` - the type of the response.
  Parameters:
    `c` - the type of the returned response.
  Returns:
    an instance of type `c`.
  Throws:
    `UniformInterfaceException`

### put

    public <T> java.util.concurrent.Future<T> put(GenericType<T> gt)
                                       throws UniformInterfaceException

  Description copied from interface: `AsyncUniformInterface`
  Invoke the PUT method with a request entity that returns a response.

  The `Future.get()` method will throw a UniformInterfaceException if the status of the HTTP response is greater than or equal to 300 and `gt` is not the type `ClientResponse`.

  Specified by:
    `put` in interface `AsyncUniformInterface`
  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`

### put

    public <T> java.util.concurrent.Future<T> put(ITypeListener<T> l)

  Description copied from interface: `AsyncUniformInterface`
  Invoke the PUT method.

  Specified by:
    `put` in interface `AsyncUniformInterface`
  Type Parameters:
    `T` - the type of the response.
  Parameters:
    `l` - the listener to receive asynchronous callbacks.
  Returns:
    a future that may be used to wait until the future completes and obtain the client response state, or cancel the request.

### put

    public <T> java.util.concurrent.Future<T> put(java.lang.Class<T> c,
                                                  java.lang.Object requestEntity)
                                       throws UniformInterfaceException

  Description copied from interface: `AsyncUniformInterface`
  Invoke the PUT method with a request entity that returns a response.

  The `Future.get()` method will throw a UniformInterfaceException if the status of the HTTP response is greater than or equal to 300 and `c` is not the type `ClientResponse`.

  Specified by:
    `put` in interface `AsyncUniformInterface`
  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`

### put

    public <T> java.util.concurrent.Future<T> put(GenericType<T> gt,
                                                  java.lang.Object requestEntity)
                                       throws UniformInterfaceException

  Description copied from interface: `AsyncUniformInterface`
  Invoke the PUT method with a request entity that returns a response.

  The `Future.get()` method will throw a UniformInterfaceException if the status of the HTTP response is greater than or equal to 300 and `gt` is not the type `ClientResponse`.

  Specified by:
    `put` in interface `AsyncUniformInterface`
  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`

### put

    public <T> java.util.concurrent.Future<T> put(ITypeListener<T> l,
                                                  java.lang.Object requestEntity)

  Description copied from interface: `AsyncUniformInterface`
  Invoke the PUT method.

  Specified by:
    `put` in interface `AsyncUniformInterface`
  Type Parameters:
    `T` - the type of the response.
  Parameters:
    `l` - the listener to receive asynchronous callbacks.
    `requestEntity` - the request entity.
  Returns:
    a future that may be used to wait until the future completes and obtain the client response state, or cancel the request.

### post

    public java.util.concurrent.Future<?> post()
                                        throws UniformInterfaceException

  Description copied from interface: `AsyncUniformInterface`
  Invoke the POST method with no request entity or response.

  If the status of the HTTP response is less than 300 and a representation is present then that representation is ignored.

  The `Future.get()` method will throw a UniformInterfaceException if the status of the HTTP response is greater than or equal to 300.

  Specified by:
    `post` in interface `AsyncUniformInterface`
  Returns:
    a void future.
  Throws:
    `UniformInterfaceException`

### post

    public java.util.concurrent.Future<?> post(java.lang.Object requestEntity)
                                        throws UniformInterfaceException

  Description copied from interface: `AsyncUniformInterface`
  Invoke the POST method with a request entity but no response.

  If the status of the HTTP response is less than 300 and a representation is present then that representation is ignored.

  The `Future.get()` method will throw a UniformInterfaceException if the status of the HTTP response is greater than or equal to 300.

  Specified by:
    `post` in interface `AsyncUniformInterface`
  Parameters:
    `requestEntity` - the request entity.
  Returns:
    a void future.
  Throws:
    `UniformInterfaceException`

### post

    public <T> java.util.concurrent.Future<T> post(java.lang.Class<T> c)
                                        throws UniformInterfaceException

  Description copied from interface: `AsyncUniformInterface`
  Invoke the POST method with no request entity that returns a response.

  The `Future.get()` method will throw a UniformInterfaceException if the status of the HTTP response is greater than or equal to 300 and `c` is not the type `ClientResponse`.

  Specified by:
    `post` in interface `AsyncUniformInterface`
  Type Parameters:
    `T` - the type of the response.
  Parameters:
    `c` - the type of the returned response.
  Returns:
    an instance of type `c`.
  Throws:
    `UniformInterfaceException`

### post

    public <T> java.util.concurrent.Future<T> post(GenericType<T> gt)
                                        throws UniformInterfaceException

  Description copied from interface: `AsyncUniformInterface`
  Invoke the POST method with a request entity that returns a response.

  The `Future.get()` method will throw a UniformInterfaceException if the status of the HTTP response is greater than or equal to 300 and `gt` is not the type `ClientResponse`.

  Specified by:
    `post` in interface `AsyncUniformInterface`
  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`

### post

    public <T> java.util.concurrent.Future<T> post(ITypeListener<T> l)

  Description copied from interface: `AsyncUniformInterface`
  Invoke the POST method.

  Specified by:
    `post` in interface `AsyncUniformInterface`
  Type Parameters:
    `T` - the type of the response.
  Parameters:
    `l` - the listener to receive asynchronous callbacks.
  Returns:
    a future that may be used to wait until the future completes and obtain the client response state, or cancel the request.

### post

    public <T> java.util.concurrent.Future<T> post(java.lang.Class<T> c,
                                                   java.lang.Object requestEntity)
                                        throws UniformInterfaceException

  Description copied from interface: `AsyncUniformInterface`
  Invoke the POST method with a request entity that returns a response.

  The `Future.get()` method will throw a UniformInterfaceException if the status of the HTTP response is greater than or equal to 300 and `c` is not the type `ClientResponse`.

  Specified by:
    `post` in interface `AsyncUniformInterface`
  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`

### post

    public <T> java.util.concurrent.Future<T> post(GenericType<T> gt,
                                                   java.lang.Object requestEntity)
                                        throws UniformInterfaceException

  Description copied from interface: `AsyncUniformInterface`
  Invoke the POST method with a request entity that returns a response.

  The `Future.get()` method will throw a UniformInterfaceException if the status of the HTTP response is greater than or equal to 300 and `gt` is not the type `ClientResponse`.

  Specified by:
    `post` in interface `AsyncUniformInterface`
  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`

### post

    public <T> java.util.concurrent.Future<T> post(ITypeListener<T> l,
                                                   java.lang.Object requestEntity)

  Description copied from interface: `AsyncUniformInterface`
  Invoke the POST method.

  Specified by:
    `post` in interface `AsyncUniformInterface`
  Type Parameters:
    `T` - the type of the response.
  Parameters:
    `l` - the listener to receive asynchronous callbacks.
    `requestEntity` - the request entity.
  Returns:
    a future that may be used to wait until the future completes and obtain the client response state, or cancel the request.

### delete

    public java.util.concurrent.Future<?> delete()
                                          throws UniformInterfaceException

  Description copied from interface: `AsyncUniformInterface`
  Invoke the DELETE method with no request entity or response.

  If the status of the HTTP response is less than 300 and a representation is present then that representation is ignored.

  The `Future.get()` method will throw a UniformInterfaceException if the status of the HTTP response is greater than or equal to 300.

  Specified by:
    `delete` in interface `AsyncUniformInterface`
  Returns:
    a void future.
  Throws:
    `UniformInterfaceException`

### delete

    public java.util.concurrent.Future<?> delete(java.lang.Object requestEntity)
                                          throws UniformInterfaceException

  Description copied from interface: `AsyncUniformInterface`
  Invoke the DELETE method with a request entity but no response.

  If the status of the HTTP response is less than 300 and a representation is present then that representation is ignored.

  The `Future.get()` method will throw a UniformInterfaceException if the status of the HTTP response is greater than or equal to 300.

  Specified by:
    `delete` in interface `AsyncUniformInterface`
  Parameters:
    `requestEntity` - the request entity.
  Returns:
    a void future.
  Throws:
    `UniformInterfaceException`

### delete

    public <T> java.util.concurrent.Future<T> delete(java.lang.Class<T> c)
                                          throws UniformInterfaceException

  Description copied from interface: `AsyncUniformInterface`
  Invoke the DELETE method with no request entity that returns a response.

  The `Future.get()` method will throw a UniformInterfaceException if the status of the HTTP response is greater than or equal to 300 and `c` is not the type `ClientResponse`.

  Specified by:
    `delete` in interface `AsyncUniformInterface`
  Type Parameters:
    `T` - the type of the response.
  Parameters:
    `c` - the type of the returned response.
  Returns:
    an instance of type `c`.
  Throws:
    `UniformInterfaceException`

### delete

    public <T> java.util.concurrent.Future<T> delete(GenericType<T> gt)
                                          throws UniformInterfaceException

  Description copied from interface: `AsyncUniformInterface`
  Invoke the DELETE method with a request entity that returns a response.

  The `Future.get()` method will throw a UniformInterfaceException if the status of the HTTP response is greater than or equal to 300 and `gt` is not the type `ClientResponse`.

  Specified by:
    `delete` in interface `AsyncUniformInterface`
  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`

### delete

    public <T> java.util.concurrent.Future<T> delete(ITypeListener<T> l)

  Description copied from interface: `AsyncUniformInterface`
  Invoke the DELETE method.

  Specified by:
    `delete` in interface `AsyncUniformInterface`
  Type Parameters:
    `T` - the type of the response.
  Parameters:
    `l` - the listener to receive asynchronous callbacks.
  Returns:
    a future that may be used to wait until the future completes and obtain the client response state, or cancel the request.

### delete

    public <T> java.util.concurrent.Future<T> delete(java.lang.Class<T> c,
                                                     java.lang.Object requestEntity)
                                          throws UniformInterfaceException

  Description copied from interface: `AsyncUniformInterface`
  Invoke the DELETE method with a request entity that returns a response.

  The `Future.get()` method will throw a UniformInterfaceException if the status of the HTTP response is greater than or equal to 300 and `c` is not the type `ClientResponse`.

  Specified by:
    `delete` in interface `AsyncUniformInterface`
  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`

### delete

    public <T> java.util.concurrent.Future<T> delete(GenericType<T> gt,
                                                     java.lang.Object requestEntity)
                                          throws UniformInterfaceException

  Description copied from interface: `AsyncUniformInterface`
  Invoke the DELETE method with a request entity that returns a response.

  The `Future.get()` method will throw a UniformInterfaceException if the status of the HTTP response is greater than or equal to 300 and `gt` is not the type `ClientResponse`.

  Specified by:
    `delete` in interface `AsyncUniformInterface`
  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`

### delete

    public <T> java.util.concurrent.Future<T> delete(ITypeListener<T> l,
                                                     java.lang.Object requestEntity)

  Description copied from interface: `AsyncUniformInterface`
  Invoke the DELETE method.

  Specified by:
    `delete` in interface `AsyncUniformInterface`
  Type Parameters:
    `T` - the type of the response.
  Parameters:
    `l` - the listener to receive asynchronous callbacks.
    `requestEntity` - the request entity.
  Returns:
    a future that may be used to wait until the future completes and obtain the client response state, or cancel the request.

### method

    public java.util.concurrent.Future<?> method(java.lang.String method)
                                          throws UniformInterfaceException

  Description copied from interface: `AsyncUniformInterface`
  Invoke a HTTP method with no request entity or response.

  If the status of the HTTP response is less than 300 and a representation is present then that representation is ignored.

  The `Future.get()` method will throw a UniformInterfaceException if the status of the HTTP response is greater than or equal to 300.

  Specified by:
    `method` in interface `AsyncUniformInterface`
  Parameters:
    `method` - the HTTP method.
  Returns:
    a void future.
  Throws:
    `UniformInterfaceException`

### method

    public java.util.concurrent.Future<?> method(java.lang.String method,
                                                 java.lang.Object requestEntity)
                                          throws UniformInterfaceException

  Description copied from interface: `AsyncUniformInterface`
  Invoke a HTTP method with a request entity but no response.

  If the status of the HTTP response is less than 300 and a representation is present then that representation is ignored.

  The `Future.get()` method will throw a UniformInterfaceException if the status of the HTTP response is greater than or equal to 300.

  Specified by:
    `method` in interface `AsyncUniformInterface`
  Parameters:
    `method` - the HTTP method.
    `requestEntity` - the request entity.
  Returns:
    a void future.
  Throws:
    `UniformInterfaceException`

### method

    public <T> java.util.concurrent.Future<T> method(java.lang.String method,
                                                     java.lang.Class<T> c)
                                          throws UniformInterfaceException

  Description copied from interface: `AsyncUniformInterface`
  Invoke a HTTP method with no request entity that returns a response.

  The `Future.get()` method will throw a UniformInterfaceException if the status of the HTTP response is greater than or equal to 300 and `c` is not the type `ClientResponse`.

  Specified by:
    `method` in interface `AsyncUniformInterface`
  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`

### method

    public <T> java.util.concurrent.Future<T> method(java.lang.String method,
                                                     GenericType<T> gt)
                                          throws UniformInterfaceException

  Description copied from interface: `AsyncUniformInterface`
  Invoke a HTTP method with no request entity that returns a response.

  The `Future.get()` method will throw a UniformInterfaceException if the status of the HTTP response is greater than or equal to 300 and `gt` is not the type `ClientResponse`.

  Specified by:
    `method` in interface `AsyncUniformInterface`
  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`

### method

    public <T> java.util.concurrent.Future<T> method(java.lang.String method,
                                                     ITypeListener<T> l)

  Description copied from interface: `AsyncUniformInterface`
  Invoke a HTTP method with no request entity that returns a response.

  Specified by:
    `method` in interface `AsyncUniformInterface`
  Type Parameters:
    `T` - the type of the response.
  Parameters:
    `method` - the HTTP method.
    `l` - the listener to receive asynchronous callbacks.
  Returns:
    a future that may be used to wait until the future completes and obtain the client response state, or cancel the request.

### method

    public <T> java.util.concurrent.Future<T> method(java.lang.String method,
                                                     java.lang.Class<T> c,
                                                     java.lang.Object requestEntity)
                                          throws UniformInterfaceException

  Description copied from interface: `AsyncUniformInterface`
  Invoke a HTTP method with a request entity that returns a response.

  The `Future.get()` method will throw a UniformInterfaceException if the status of the HTTP response is greater than or equal to 300 and `c` is not the type `ClientResponse`.

  Specified by:
    `method` in interface `AsyncUniformInterface`
  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`

### method

    public <T> java.util.concurrent.Future<T> method(java.lang.String method,
                                                     GenericType<T> gt,
                                                     java.lang.Object requestEntity)
                                          throws UniformInterfaceException

  Description copied from interface: `AsyncUniformInterface`
  Invoke a HTTP method with a request entity that returns a response.

  The `Future.get()` method will throw a UniformInterfaceException if the status of the HTTP response is greater than or equal to 300 and `gt` is not the type `ClientResponse`.

  Specified by:
    `method` in interface `AsyncUniformInterface`
  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`

### method

    public <T> java.util.concurrent.Future<T> method(java.lang.String method,
                                                     ITypeListener<T> l,
                                                     java.lang.Object requestEntity)

  Description copied from interface: `AsyncUniformInterface`
  Invoke a HTTP method with a request entity that returns a response.

  Specified by:
    `method` in interface `AsyncUniformInterface`
  Type Parameters:
    `T` - the type of the response.
  Parameters:
    `method` - the HTTP method.
    `l` - the listener to receive asynchronous callbacks.
    `requestEntity` - the request entity.
  Returns:
    a future that may be used to wait until the future completes and obtain the client response state, or cancel the request.

### entity

    public AsyncWebResource.Builder entity(java.lang.Object entity)

  Description copied from interface: `RequestBuilder`
  Set the request entity.

  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.

  Specified by:
    `entity` in interface `RequestBuilder<AsyncWebResource.Builder>`
  Parameters:
    `entity` - the request entity
  Returns:
    the builder.

### entity

    public AsyncWebResource.Builder entity(java.lang.Object entity,
                                           MediaType type)

  Description copied from interface: `RequestBuilder`
  Set the request entity with its media 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.

  Specified by:
    `entity` in interface `RequestBuilder<AsyncWebResource.Builder>`
  Parameters:
    `entity` - the request entity
    `type` - the media type
  Returns:
    the builder.

### entity

    public AsyncWebResource.Builder entity(java.lang.Object entity,
                                           java.lang.String type)

  Description copied from interface: `RequestBuilder`
  Set the request entity with its media 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.

  Specified by:
    `entity` in interface `RequestBuilder<AsyncWebResource.Builder>`
  Parameters:
    `entity` - the request entity
    `type` - the media type
  Returns:
    the builder.

### type

    public AsyncWebResource.Builder type(MediaType type)

  Description copied from interface: `RequestBuilder`
  Set the media type.

  Specified by:
    `type` in interface `RequestBuilder<AsyncWebResource.Builder>`
  Parameters:
    `type` - the media type
  Returns:
    the builder.

### type

    public AsyncWebResource.Builder type(java.lang.String type)

  Description copied from interface: `RequestBuilder`
  Set the media type.

  Specified by:
    `type` in interface `RequestBuilder<AsyncWebResource.Builder>`
  Parameters:
    `type` - the media type
  Returns:
    the builder.

### accept

    public AsyncWebResource.Builder accept(MediaType... types)

  Description copied from interface: `RequestBuilder`
  Add acceptable media types.

  Specified by:
    `accept` in interface `RequestBuilder<AsyncWebResource.Builder>`
  Parameters:
    `types` - an array of the acceptable media types
  Returns:
    the builder.

### accept

    public AsyncWebResource.Builder accept(java.lang.String... types)

  Description copied from interface: `RequestBuilder`
  Add acceptable media types.

  Specified by:
    `accept` in interface `RequestBuilder<AsyncWebResource.Builder>`
  Parameters:
    `types` - an array of the acceptable media types
  Returns:
    the builder.

### acceptLanguage

    public AsyncWebResource.Builder acceptLanguage(java.util.Locale... locales)

  Description copied from interface: `RequestBuilder`
  Add acceptable languages

  Specified by:
    `acceptLanguage` in interface `RequestBuilder<AsyncWebResource.Builder>`
  Parameters:
    `locales` - an array of the acceptable languages
  Returns:
    the builder.

### acceptLanguage

    public AsyncWebResource.Builder acceptLanguage(java.lang.String... locales)

  Description copied from interface: `RequestBuilder`
  Add acceptable languages

  Specified by:
    `acceptLanguage` in interface `RequestBuilder<AsyncWebResource.Builder>`
  Parameters:
    `locales` - an array of the acceptable languages
  Returns:
    the builder.

### cookie

    public AsyncWebResource.Builder cookie(Cookie cookie)

  Description copied from interface: `RequestBuilder`
  Add a cookie to be set.

  Specified by:
    `cookie` in interface `RequestBuilder<AsyncWebResource.Builder>`
  Parameters:
    `cookie` - to be set.
  Returns:
    the builder

### header

    public AsyncWebResource.Builder header(java.lang.String name,
                                           java.lang.Object value)

  Description copied from interface: `RequestBuilder`
  Add an HTTP header and value.

  Specified by:
    `header` in interface `RequestBuilder<AsyncWebResource.Builder>`
  Parameters:
    `name` - the HTTP header name.
    `value` - the HTTP header value.
  Returns:
    the builder.

### path

    public AsyncWebResource path(java.lang.String path)

  Create a new AsyncWebResource from this web resource with an additional path added to the URI of this web resource.

  Any filters on this web resource are inherited. Removal of filters may cause undefined behaviour.

  Parameters:
    `path` - the additional path.
  Returns:
    the new web resource.

### uri

    public AsyncWebResource uri(java.net.URI uri)

  Create a new AsyncWebResource from this web resource.

  If the URI contains a path component and the path starts with a '/' then the path of this web resource URI is replaced. Otherwise the path is appended.

  If the URI contains query parameters then those query parameters will replace the query parameters (if any) of this web resource.

  Any filters on this web resource are inherited. Removal of filters may cause undefined behaviour.

  Parameters:
    `uri` - the URI.
  Returns:
    the new web resource.

### queryParam

    public AsyncWebResource queryParam(java.lang.String key,
                                       java.lang.String value)

  Create a new WebResource from this web resource with an additional query parameter added to the URI of this web resource.

  Parameters:
    `key` - the query parameter name
    `value` - the query parameter value
  Returns:
    the new web resource.

### queryParams

    public AsyncWebResource queryParams(MultivaluedMap<java.lang.String,java.lang.String> params)

  Create a new WebResource from this web resource with additional query parameters added to the URI of this web resource.

  Parameters:
    `params` - the query parameters.
  Returns:
    the new web resource.

### setProperty

    public void setProperty(java.lang.String property,
                            java.lang.Object value)

  Sets WebResource related property.

  Parameters:
    `property` - property identifier.
    `value` - value of given property.

### getProperties

    public java.util.Map<java.lang.String,java.lang.Object> getProperties()

  Gets WebResource related properties.

  Properties are inherited, so setting propeties on "parent" WebResource instance, creating child (for example via WebResource.path("subpath")) will set parents properties on it. However changing child properties won't cause change in parent's properties.

  Methods entrySet(), keySet() and values() are returning read-only results (via Collection.unmodifiableMap).

  Returns:
    map containg all properties.

### handle

    public java.util.concurrent.Future<ClientResponse> handle(ClientRequest request,
                                                              FutureListener<ClientResponse> l)

  Description copied from interface: `AsyncClientHandler`
  Invoke an asynchronous client request. This method returns without waiting for the client response.

  Specified by:
    `handle` in interface `AsyncClientHandler`
  Parameters:
    `request` - the client request.
    `l` - the future listener to receive a completed Future with the client response.
  Returns:
    a future that may be used to wait until the future completes and obtain the client response state, or cancel the request.

Copyright © 2017 Oracle Corporation. All Rights Reserved.