Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sun.jersey.api.client
Interface AsyncUniformInterface

All Known Implementing Classes:
  AsyncWebResource, AsyncWebResource.Builder

    public interface AsyncUniformInterface

An asynchronous uniform interface for invoking HTTP requests.

Any Java type for a response entity, that is supported by the client configuration of the client, may be declared using `Class<T>` 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 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
See Also:
  `com.sun.jersey.api.client`

Method Summary
`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.
`
`<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.
`java.util.concurrent.Future<ClientResponse>` | `head()` Invoke the HEAD method.
`java.util.concurrent.Future<ClientResponse>` | `head(ITypeListener<ClientResponse> l)` Invoke the HEAD method.
`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.
`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.

Method Detail

### head

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

  Invoke the HEAD method.

  Returns:
    the HTTP response.

### head

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

  Invoke the HEAD method.

  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

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

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

  Type Parameters:
    `T` - the type of the response.
  Parameters:
    `c` - the type of the returned response.
  Returns:
    an instance of type `c`.

### options

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

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

  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

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

  Invoke the OPTIONS method.

  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

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

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

  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

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

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

  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

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

  Invoke the GET method.

  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

    java.util.concurrent.Future<?> put()

  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.

  Returns:
    a void future.

### put

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

  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.

  Parameters:
    `requestEntity` - the request entity.
  Returns:
    a void future.

### put

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

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

  Type Parameters:
    `T` - the type of the response.
  Parameters:
    `c` - the type of the returned response.
  Returns:
    an instance of type `c`.

### put

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

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

  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.

### put

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

  Invoke the PUT method.

  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

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

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

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

### put

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

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

  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.

### put

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

  Invoke the PUT method.

  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

    java.util.concurrent.Future<?> post()

  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.

  Returns:
    a void future.

### post

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

  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.

  Parameters:
    `requestEntity` - the request entity.
  Returns:
    a void future.

### post

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

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

  Type Parameters:
    `T` - the type of the response.
  Parameters:
    `c` - the type of the returned response.
  Returns:
    an instance of type `c`.

### post

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

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

  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.

### post

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

  Invoke the POST method.

  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

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

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

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

### post

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

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

  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.

### post

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

  Invoke the POST method.

  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

    java.util.concurrent.Future<?> delete()

  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.

  Returns:
    a void future.

### delete

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

  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.

  Parameters:
    `requestEntity` - the request entity.
  Returns:
    a void future.

### delete

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

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

  Type Parameters:
    `T` - the type of the response.
  Parameters:
    `c` - the type of the returned response.
  Returns:
    an instance of type `c`.

### delete

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

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

  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.

### delete

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

  Invoke the DELETE method.

  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

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

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

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

### delete

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

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

  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.

### delete

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

  Invoke the DELETE method.

  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

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

  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.

  Parameters:
    `method` - the HTTP method.
  Returns:
    a void future.

### method

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

  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.

  Parameters:
    `method` - the HTTP method.
    `requestEntity` - the request entity.
  Returns:
    a void future.

### method

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

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

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

### method

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

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

  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.

### method

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

  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

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

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

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

### method

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

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

  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.

### method

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

  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.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2011 Oracle Corporation. All Rights Reserved.