org.glassfish.jersey.client
Class JerseyInvocation.Builder

java.lang.Object
  extended by org.glassfish.jersey.client.JerseyInvocation.Builder
All Implemented Interfaces:
Invocation.Builder, SyncInvoker
Enclosing class:
JerseyInvocation

public static class JerseyInvocation.Builder
extends java.lang.Object
implements Invocation.Builder

Jersey-specific client invocation builder.


Constructor Summary
protected JerseyInvocation.Builder(java.net.URI uri, JerseyConfiguration configuration, JerseyClient client)
          Create new Jersey-specific client invocation builder.
 
Method Summary
 JerseyInvocation.Builder acceptLanguage(java.util.Locale... locales)
           
 JerseyInvocation.Builder acceptLanguage(java.lang.String... locales)
           
 JerseyInvocation.Builder allow(java.util.Set<java.lang.String> methods)
           
 JerseyInvocation.Builder allow(java.lang.String... methods)
           
 AsyncInvoker async()
           
 JerseyInvocation build(java.lang.String method)
           
 JerseyInvocation build(java.lang.String method, Entity<?> entity)
           
 JerseyInvocation buildDelete()
           
 JerseyInvocation buildGet()
           
 JerseyInvocation buildPost(Entity<?> entity)
           
 JerseyInvocation buildPut(Entity<?> entity)
           
 JerseyInvocation.Builder cacheControl(CacheControl cacheControl)
           
 JerseyConfiguration configuration()
           
 JerseyInvocation.Builder cookie(Cookie cookie)
           
 Response delete()
           
<T> T
delete(java.lang.Class<T> responseType)
           
<T> T
delete(GenericType<T> responseType)
           
 Response get()
           
<T> T
get(java.lang.Class<T> responseType)
           
<T> T
get(GenericType<T> responseType)
           
 Response head()
           
 JerseyInvocation.Builder header(java.lang.String name, java.lang.Object value)
           
 Invocation.Builder headers(MultivaluedMap<java.lang.String,java.lang.Object> headers)
           
 Response method(java.lang.String name)
           
<T> T
method(java.lang.String name, java.lang.Class<T> responseType)
           
 Response method(java.lang.String name, Entity<?> entity)
           
<T> T
method(java.lang.String name, Entity<?> entity, java.lang.Class<T> responseType)
           
<T> T
method(java.lang.String name, Entity<?> entity, GenericType<T> responseType)
           
<T> T
method(java.lang.String name, GenericType<T> responseType)
           
 Response options()
           
<T> T
options(java.lang.Class<T> responseType)
           
<T> T
options(GenericType<T> responseType)
           
 Response post(Entity<?> entity)
           
<T> T
post(Entity<?> entity, java.lang.Class<T> responseType)
           
<T> T
post(Entity<?> entity, GenericType<T> responseType)
           
 Response put(Entity<?> entity)
           
<T> T
put(Entity<?> entity, java.lang.Class<T> responseType)
           
<T> T
put(Entity<?> entity, GenericType<T> responseType)
           
 Response trace(Entity<?> entity)
           
<T> T
trace(Entity<?> entity, java.lang.Class<T> responseType)
           
<T> T
trace(Entity<?> entity, GenericType<T> responseType)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JerseyInvocation.Builder

protected JerseyInvocation.Builder(java.net.URI uri,
                                   JerseyConfiguration configuration,
                                   JerseyClient client)
Create new Jersey-specific client invocation builder.

Parameters:
uri - invoked request URI.
configuration - Jersey client configuration.
client - Jersey client that will process the invocation.
Method Detail

build

public JerseyInvocation build(java.lang.String method)
Specified by:
build in interface Invocation.Builder

build

public JerseyInvocation build(java.lang.String method,
                              Entity<?> entity)
Specified by:
build in interface Invocation.Builder

buildGet

public JerseyInvocation buildGet()
Specified by:
buildGet in interface Invocation.Builder

buildDelete

public JerseyInvocation buildDelete()
Specified by:
buildDelete in interface Invocation.Builder

buildPost

public JerseyInvocation buildPost(Entity<?> entity)
Specified by:
buildPost in interface Invocation.Builder

buildPut

public JerseyInvocation buildPut(Entity<?> entity)
Specified by:
buildPut in interface Invocation.Builder

async

public AsyncInvoker async()
Specified by:
async in interface Invocation.Builder

acceptLanguage

public JerseyInvocation.Builder acceptLanguage(java.util.Locale... locales)
Specified by:
acceptLanguage in interface Invocation.Builder

acceptLanguage

public JerseyInvocation.Builder acceptLanguage(java.lang.String... locales)
Specified by:
acceptLanguage in interface Invocation.Builder

cookie

public JerseyInvocation.Builder cookie(Cookie cookie)
Specified by:
cookie in interface Invocation.Builder

allow

public JerseyInvocation.Builder allow(java.lang.String... methods)
Specified by:
allow in interface Invocation.Builder

allow

public JerseyInvocation.Builder allow(java.util.Set<java.lang.String> methods)
Specified by:
allow in interface Invocation.Builder

cacheControl

public JerseyInvocation.Builder cacheControl(CacheControl cacheControl)
Specified by:
cacheControl in interface Invocation.Builder

header

public JerseyInvocation.Builder header(java.lang.String name,
                                       java.lang.Object value)
Specified by:
header in interface Invocation.Builder

headers

public Invocation.Builder headers(MultivaluedMap<java.lang.String,java.lang.Object> headers)
Specified by:
headers in interface Invocation.Builder

configuration

public JerseyConfiguration configuration()
Specified by:
configuration in interface Invocation.Builder

get

public Response get()
             throws InvocationException
Specified by:
get in interface SyncInvoker
Throws:
InvocationException

get

public <T> T get(java.lang.Class<T> responseType)
      throws InvocationException
Specified by:
get in interface SyncInvoker
Throws:
InvocationException

get

public <T> T get(GenericType<T> responseType)
      throws InvocationException
Specified by:
get in interface SyncInvoker
Throws:
InvocationException

put

public Response put(Entity<?> entity)
             throws InvocationException
Specified by:
put in interface SyncInvoker
Throws:
InvocationException

put

public <T> T put(Entity<?> entity,
                 java.lang.Class<T> responseType)
      throws InvocationException
Specified by:
put in interface SyncInvoker
Throws:
InvocationException

put

public <T> T put(Entity<?> entity,
                 GenericType<T> responseType)
      throws InvocationException
Specified by:
put in interface SyncInvoker
Throws:
InvocationException

post

public Response post(Entity<?> entity)
              throws InvocationException
Specified by:
post in interface SyncInvoker
Throws:
InvocationException

post

public <T> T post(Entity<?> entity,
                  java.lang.Class<T> responseType)
       throws InvocationException
Specified by:
post in interface SyncInvoker
Throws:
InvocationException

post

public <T> T post(Entity<?> entity,
                  GenericType<T> responseType)
       throws InvocationException
Specified by:
post in interface SyncInvoker
Throws:
InvocationException

delete

public Response delete()
                throws InvocationException
Specified by:
delete in interface SyncInvoker
Throws:
InvocationException

delete

public <T> T delete(java.lang.Class<T> responseType)
         throws InvocationException
Specified by:
delete in interface SyncInvoker
Throws:
InvocationException

delete

public <T> T delete(GenericType<T> responseType)
         throws InvocationException
Specified by:
delete in interface SyncInvoker
Throws:
InvocationException

head

public Response head()
              throws InvocationException
Specified by:
head in interface SyncInvoker
Throws:
InvocationException

options

public Response options()
                 throws InvocationException
Specified by:
options in interface SyncInvoker
Throws:
InvocationException

options

public <T> T options(java.lang.Class<T> responseType)
          throws InvocationException
Specified by:
options in interface SyncInvoker
Throws:
InvocationException

options

public <T> T options(GenericType<T> responseType)
          throws InvocationException
Specified by:
options in interface SyncInvoker
Throws:
InvocationException

trace

public Response trace(Entity<?> entity)
               throws InvocationException
Specified by:
trace in interface SyncInvoker
Throws:
InvocationException

trace

public <T> T trace(Entity<?> entity,
                   java.lang.Class<T> responseType)
        throws InvocationException
Specified by:
trace in interface SyncInvoker
Throws:
InvocationException

trace

public <T> T trace(Entity<?> entity,
                   GenericType<T> responseType)
        throws InvocationException
Specified by:
trace in interface SyncInvoker
Throws:
InvocationException

method

public Response method(java.lang.String name)
                throws InvocationException
Specified by:
method in interface SyncInvoker
Throws:
InvocationException

method

public <T> T method(java.lang.String name,
                    java.lang.Class<T> responseType)
         throws InvocationException
Specified by:
method in interface SyncInvoker
Throws:
InvocationException

method

public <T> T method(java.lang.String name,
                    GenericType<T> responseType)
         throws InvocationException
Specified by:
method in interface SyncInvoker
Throws:
InvocationException

method

public Response method(java.lang.String name,
                       Entity<?> entity)
                throws InvocationException
Specified by:
method in interface SyncInvoker
Throws:
InvocationException

method

public <T> T method(java.lang.String name,
                    Entity<?> entity,
                    java.lang.Class<T> responseType)
         throws InvocationException
Specified by:
method in interface SyncInvoker
Throws:
InvocationException

method

public <T> T method(java.lang.String name,
                    Entity<?> entity,
                    GenericType<T> responseType)
         throws InvocationException
Specified by:
method in interface SyncInvoker
Throws:
InvocationException


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