javax.ws.rs.client
Interface SyncInvoker

All Known Subinterfaces:
Invocation.Builder

public interface SyncInvoker

Uniform interface for synchronous invocation of HTTP methods.

Since:
2.0
Author:
Marek Potociar

Method Summary
 Response delete()
          Invoke HTTP DELETE method for the current request synchronously.
<T> T
delete(java.lang.Class<T> responseType)
          Invoke HTTP DELETE method for the current request synchronously.
<T> T
delete(GenericType<T> responseType)
          Invoke HTTP DELETE method for the current request synchronously.
 Response get()
          Invoke HTTP GET method for the current request synchronously.
<T> T
get(java.lang.Class<T> responseType)
          Invoke HTTP GET method for the current request synchronously.
<T> T
get(GenericType<T> responseType)
          Invoke HTTP GET method for the current request synchronously.
 Response head()
          Invoke HTTP HEAD method for the current request synchronously.
 Response method(java.lang.String name)
          Invoke an arbitrary method for the current request synchronously.
<T> T
method(java.lang.String name, java.lang.Class<T> responseType)
          Invoke an arbitrary method for the current request synchronously.
 Response method(java.lang.String name, Entity<?> entity)
          Invoke an arbitrary method for the current request synchronously.
<T> T
method(java.lang.String name, Entity<?> entity, java.lang.Class<T> responseType)
          Invoke an arbitrary method for the current request synchronously.
<T> T
method(java.lang.String name, Entity<?> entity, GenericType<T> responseType)
          Invoke an arbitrary method for the current request synchronously.
<T> T
method(java.lang.String name, GenericType<T> responseType)
          Invoke an arbitrary method for the current request synchronously.
 Response options()
          Invoke HTTP OPTIONS method for the current request synchronously.
<T> T
options(java.lang.Class<T> responseType)
          Invoke HTTP OPTIONS method for the current request synchronously.
<T> T
options(GenericType<T> responseType)
          Invoke HTTP OPTIONS method for the current request synchronously.
 Response post(Entity<?> entity)
          Invoke HTTP POST method for the current request synchronously.
<T> T
post(Entity<?> entity, java.lang.Class<T> responseType)
          Invoke HTTP POST method for the current request synchronously.
<T> T
post(Entity<?> entity, GenericType<T> responseType)
          Invoke HTTP POST method for the current request synchronously.
 Response put(Entity<?> entity)
          Invoke HTTP PUT method for the current request synchronously.
<T> T
put(Entity<?> entity, java.lang.Class<T> responseType)
          Invoke HTTP PUT method for the current request synchronously.
<T> T
put(Entity<?> entity, GenericType<T> responseType)
          Invoke HTTP PUT method for the current request synchronously.
 Response trace()
          Invoke HTTP TRACE method for the current request synchronously.
<T> T
trace(java.lang.Class<T> responseType)
          Invoke HTTP TRACE method for the current request synchronously.
<T> T
trace(GenericType<T> responseType)
          Invoke HTTP TRACE method for the current request synchronously.
 

Method Detail

get

Response get()
             throws ClientException
Invoke HTTP GET method for the current request synchronously.

Returns:
invocation response.
Throws:
ClientException - in case the invocation processing has failed.

get

<T> T get(java.lang.Class<T> responseType)
      throws ClientException,
             WebApplicationException
Invoke HTTP GET method for the current request synchronously.

Type Parameters:
T - response entity type.
Parameters:
responseType - Java type the response entity will be converted to.
Returns:
invocation response.
Throws:
ClientException - in case the invocation processing has failed.
WebApplicationException - in case the response status code of the response returned by the server is not successful.

get

<T> T get(GenericType<T> responseType)
      throws ClientException,
             WebApplicationException
Invoke HTTP GET method for the current request synchronously.

Type Parameters:
T - generic response entity type.
Parameters:
responseType - representation of a generic Java type the response entity will be converted to.
Returns:
invocation response.
Throws:
ClientException - in case the invocation processing has failed.
WebApplicationException - in case the response status code of the response returned by the server is not successful.

put

Response put(Entity<?> entity)
             throws ClientException
Invoke HTTP PUT method for the current request synchronously.

Parameters:
entity - request entity.
Returns:
invocation response.
Throws:
ClientException - in case the invocation processing has failed.

put

<T> T put(Entity<?> entity,
          java.lang.Class<T> responseType)
      throws ClientException,
             WebApplicationException
Invoke HTTP PUT method for the current request synchronously.

Type Parameters:
T - response entity type.
Parameters:
entity - request entity.
responseType - Java type the response entity will be converted to.
Returns:
invocation response.
Throws:
ClientException - in case the invocation processing has failed.
WebApplicationException - in case the response status code of the response returned by the server is not successful.

put

<T> T put(Entity<?> entity,
          GenericType<T> responseType)
      throws ClientException,
             WebApplicationException
Invoke HTTP PUT method for the current request synchronously.

Type Parameters:
T - generic response entity type.
Parameters:
entity - request entity.
responseType - representation of a generic Java type the response entity will be converted to.
Returns:
invocation response.
Throws:
ClientException - in case the invocation processing has failed.
WebApplicationException - in case the response status code of the response returned by the server is not successful.

post

Response post(Entity<?> entity)
              throws ClientException
Invoke HTTP POST method for the current request synchronously.

Parameters:
entity - request entity.
Returns:
invocation response.
Throws:
ClientException - in case the invocation processing has failed.

post

<T> T post(Entity<?> entity,
           java.lang.Class<T> responseType)
       throws ClientException,
              WebApplicationException
Invoke HTTP POST method for the current request synchronously.

Type Parameters:
T - response entity type.
Parameters:
entity - request entity.
responseType - Java type the response entity will be converted to.
Returns:
invocation response.
Throws:
ClientException - in case the invocation processing has failed.
WebApplicationException - in case the response status code of the response returned by the server is not successful.

post

<T> T post(Entity<?> entity,
           GenericType<T> responseType)
       throws ClientException,
              WebApplicationException
Invoke HTTP POST method for the current request synchronously.

Type Parameters:
T - generic response entity type.
Parameters:
entity - request entity.
responseType - representation of a generic Java type the response entity will be converted to.
Returns:
invocation response.
Throws:
ClientException - in case the invocation processing has failed.
WebApplicationException - in case the response status code of the response returned by the server is not successful.

delete

Response delete()
                throws ClientException
Invoke HTTP DELETE method for the current request synchronously.

Returns:
invocation response.
Throws:
ClientException - in case the invocation processing has failed.

delete

<T> T delete(java.lang.Class<T> responseType)
         throws ClientException,
                WebApplicationException
Invoke HTTP DELETE method for the current request synchronously.

Type Parameters:
T - response entity type.
Parameters:
responseType - Java type the response entity will be converted to.
Returns:
invocation response.
Throws:
ClientException - in case the invocation processing has failed.
WebApplicationException - in case the response status code of the response returned by the server is not successful.

delete

<T> T delete(GenericType<T> responseType)
         throws ClientException,
                WebApplicationException
Invoke HTTP DELETE method for the current request synchronously.

Type Parameters:
T - generic response entity type.
Parameters:
responseType - representation of a generic Java type the response entity will be converted to.
Returns:
invocation response.
Throws:
ClientException - in case the invocation processing has failed.
WebApplicationException - in case the response status code of the response returned by the server is not successful.

head

Response head()
              throws ClientException
Invoke HTTP HEAD method for the current request synchronously.

Returns:
invocation response.
Throws:
ClientException - in case the invocation processing has failed.

options

Response options()
                 throws ClientException
Invoke HTTP OPTIONS method for the current request synchronously.

Returns:
invocation response.
Throws:
ClientException - in case the invocation processing has failed.

options

<T> T options(java.lang.Class<T> responseType)
          throws ClientException,
                 WebApplicationException
Invoke HTTP OPTIONS method for the current request synchronously.

Type Parameters:
T - response entity type.
Parameters:
responseType - Java type the response entity will be converted to.
Returns:
invocation response.
Throws:
ClientException - in case the invocation processing has failed.
WebApplicationException - in case the response status code of the response returned by the server is not successful.

options

<T> T options(GenericType<T> responseType)
          throws ClientException,
                 WebApplicationException
Invoke HTTP OPTIONS method for the current request synchronously.

Type Parameters:
T - generic response entity type.
Parameters:
responseType - representation of a generic Java type the response entity will be converted to.
Returns:
invocation response.
Throws:
ClientException - in case the invocation processing has failed.
WebApplicationException - in case the response status code of the response returned by the server is not successful.

trace

Response trace()
               throws ClientException
Invoke HTTP TRACE method for the current request synchronously.

Returns:
invocation response.
Throws:
ClientException - in case the invocation processing has failed.

trace

<T> T trace(java.lang.Class<T> responseType)
        throws ClientException,
               WebApplicationException
Invoke HTTP TRACE method for the current request synchronously.

Type Parameters:
T - response entity type.
Parameters:
responseType - Java type the response entity will be converted to.
Returns:
invocation response.
Throws:
ClientException - in case the invocation processing has failed.
WebApplicationException - in case the response status code of the response returned by the server is not successful.

trace

<T> T trace(GenericType<T> responseType)
        throws ClientException,
               WebApplicationException
Invoke HTTP TRACE method for the current request synchronously.

Type Parameters:
T - generic response entity type.
Parameters:
responseType - representation of a generic Java type the response entity will be converted to.
Returns:
invocation response.
Throws:
ClientException - in case the invocation processing has failed.
WebApplicationException - in case the response status code of the response returned by the server is not successful.

method

Response method(java.lang.String name)
                throws ClientException
Invoke an arbitrary method for the current request synchronously.

Parameters:
name - method name.
Returns:
invocation response.
Throws:
ClientException - in case the invocation processing has failed.

method

<T> T method(java.lang.String name,
             java.lang.Class<T> responseType)
         throws ClientException,
                WebApplicationException
Invoke an arbitrary method for the current request synchronously.

Type Parameters:
T - response entity type.
Parameters:
name - method name.
responseType - Java type the response entity will be converted to.
Returns:
invocation response.
Throws:
ClientException - in case the invocation processing has failed.
WebApplicationException - in case the response status code of the response returned by the server is not successful.

method

<T> T method(java.lang.String name,
             GenericType<T> responseType)
         throws ClientException,
                WebApplicationException
Invoke an arbitrary method for the current request synchronously.

Type Parameters:
T - generic response entity type.
Parameters:
name - method name.
responseType - representation of a generic Java type the response entity will be converted to.
Returns:
invocation response.
Throws:
ClientException - in case the invocation processing has failed.
WebApplicationException - in case the response status code of the response returned by the server is not successful.

method

Response method(java.lang.String name,
                Entity<?> entity)
                throws ClientException
Invoke an arbitrary method for the current request synchronously.

Parameters:
name - method name.
entity - request entity.
Returns:
invocation response.
Throws:
ClientException - in case the invocation processing has failed.

method

<T> T method(java.lang.String name,
             Entity<?> entity,
             java.lang.Class<T> responseType)
         throws ClientException,
                WebApplicationException
Invoke an arbitrary method for the current request synchronously.

Type Parameters:
T - response entity type.
Parameters:
name - method name.
entity - request entity.
responseType - Java type the response entity will be converted to.
Returns:
invocation response.
Throws:
ClientException - in case the invocation processing has failed.
WebApplicationException - in case the response status code of the response returned by the server is not successful.

method

<T> T method(java.lang.String name,
             Entity<?> entity,
             GenericType<T> responseType)
         throws ClientException,
                WebApplicationException
Invoke an arbitrary method for the current request synchronously.

Type Parameters:
T - generic response entity type.
Parameters:
name - method name.
entity - request entity.
responseType - representation of a generic Java type the response entity will be converted to.
Returns:
invocation response.
Throws:
ClientException - in case the invocation processing has failed.
WebApplicationException - in case the response status code of the response returned by the server is not successful.


Copyright © 2007-2012 Oracle Corporation. All Rights Reserved. Use is subject to license terms.