org.glassfish.jersey.client
Class JerseyInvocation.Builder

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

public static class JerseyInvocation.Builder
extends java.lang.Object
implements javax.ws.rs.client.Invocation.Builder

Jersey-specific client invocation builder.


Constructor Summary
protected JerseyInvocation.Builder(java.net.URI uri, ClientConfig configuration)
          Create new Jersey-specific client invocation builder.
 
Method Summary
 JerseyInvocation.Builder accept(javax.ws.rs.core.MediaType... mediaTypes)
           
 JerseyInvocation.Builder accept(java.lang.String... mediaTypes)
           
 javax.ws.rs.client.Invocation.Builder acceptEncoding(java.lang.String... encodings)
           
 JerseyInvocation.Builder acceptLanguage(java.util.Locale... locales)
           
 JerseyInvocation.Builder acceptLanguage(java.lang.String... locales)
           
 javax.ws.rs.client.AsyncInvoker async()
           
 JerseyInvocation build(java.lang.String method)
           
 JerseyInvocation build(java.lang.String method, javax.ws.rs.client.Entity<?> entity)
           
 JerseyInvocation buildDelete()
           
 JerseyInvocation buildGet()
           
 JerseyInvocation buildPost(javax.ws.rs.client.Entity<?> entity)
           
 JerseyInvocation buildPut(javax.ws.rs.client.Entity<?> entity)
           
 JerseyInvocation.Builder cacheControl(javax.ws.rs.core.CacheControl cacheControl)
           
 JerseyInvocation.Builder cookie(javax.ws.rs.core.Cookie cookie)
           
 JerseyInvocation.Builder cookie(java.lang.String name, java.lang.String value)
           
 javax.ws.rs.core.Response delete()
           
<T> T
delete(java.lang.Class<T> responseType)
           
<T> T
delete(javax.ws.rs.core.GenericType<T> responseType)
           
 javax.ws.rs.core.Response get()
           
<T> T
get(java.lang.Class<T> responseType)
           
<T> T
get(javax.ws.rs.core.GenericType<T> responseType)
           
 javax.ws.rs.core.Response head()
           
 JerseyInvocation.Builder header(java.lang.String name, java.lang.Object value)
           
 JerseyInvocation.Builder headers(javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.Object> headers)
           
 javax.ws.rs.core.Response method(java.lang.String name)
           
<T> T
method(java.lang.String name, java.lang.Class<T> responseType)
           
 javax.ws.rs.core.Response method(java.lang.String name, javax.ws.rs.client.Entity<?> entity)
           
<T> T
method(java.lang.String name, javax.ws.rs.client.Entity<?> entity, java.lang.Class<T> responseType)
           
<T> T
method(java.lang.String name, javax.ws.rs.client.Entity<?> entity, javax.ws.rs.core.GenericType<T> responseType)
           
<T> T
method(java.lang.String name, javax.ws.rs.core.GenericType<T> responseType)
           
 javax.ws.rs.core.Response options()
           
<T> T
options(java.lang.Class<T> responseType)
           
<T> T
options(javax.ws.rs.core.GenericType<T> responseType)
           
 javax.ws.rs.core.Response post(javax.ws.rs.client.Entity<?> entity)
           
<T> T
post(javax.ws.rs.client.Entity<?> entity, java.lang.Class<T> responseType)
           
<T> T
post(javax.ws.rs.client.Entity<?> entity, javax.ws.rs.core.GenericType<T> responseType)
           
 JerseyInvocation.Builder property(java.lang.String name, java.lang.Object value)
           
 javax.ws.rs.core.Response put(javax.ws.rs.client.Entity<?> entity)
           
<T> T
put(javax.ws.rs.client.Entity<?> entity, java.lang.Class<T> responseType)
           
<T> T
put(javax.ws.rs.client.Entity<?> entity, javax.ws.rs.core.GenericType<T> responseType)
           
 javax.ws.rs.core.Response trace()
           
<T> T
trace(java.lang.Class<T> responseType)
           
<T> T
trace(javax.ws.rs.core.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,
                                   ClientConfig configuration)
Create new Jersey-specific client invocation builder.

Parameters:
uri - invoked request URI.
configuration - Jersey client configuration.
Method Detail

build

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

build

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

buildGet

public JerseyInvocation buildGet()
Specified by:
buildGet in interface javax.ws.rs.client.Invocation.Builder

buildDelete

public JerseyInvocation buildDelete()
Specified by:
buildDelete in interface javax.ws.rs.client.Invocation.Builder

buildPost

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

buildPut

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

async

public javax.ws.rs.client.AsyncInvoker async()
Specified by:
async in interface javax.ws.rs.client.Invocation.Builder

accept

public JerseyInvocation.Builder accept(java.lang.String... mediaTypes)
Specified by:
accept in interface javax.ws.rs.client.Invocation.Builder

accept

public JerseyInvocation.Builder accept(javax.ws.rs.core.MediaType... mediaTypes)
Specified by:
accept in interface javax.ws.rs.client.Invocation.Builder

acceptEncoding

public javax.ws.rs.client.Invocation.Builder acceptEncoding(java.lang.String... encodings)
Specified by:
acceptEncoding in interface javax.ws.rs.client.Invocation.Builder

acceptLanguage

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

acceptLanguage

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

cookie

public JerseyInvocation.Builder cookie(javax.ws.rs.core.Cookie cookie)
Specified by:
cookie in interface javax.ws.rs.client.Invocation.Builder

cookie

public JerseyInvocation.Builder cookie(java.lang.String name,
                                       java.lang.String value)
Specified by:
cookie in interface javax.ws.rs.client.Invocation.Builder

cacheControl

public JerseyInvocation.Builder cacheControl(javax.ws.rs.core.CacheControl cacheControl)
Specified by:
cacheControl in interface javax.ws.rs.client.Invocation.Builder

header

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

headers

public JerseyInvocation.Builder headers(javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.Object> headers)
Specified by:
headers in interface javax.ws.rs.client.Invocation.Builder

get

public javax.ws.rs.core.Response get()
                              throws javax.ws.rs.ProcessingException
Specified by:
get in interface javax.ws.rs.client.SyncInvoker
Throws:
javax.ws.rs.ProcessingException

get

public <T> T get(java.lang.Class<T> responseType)
      throws javax.ws.rs.ProcessingException,
             javax.ws.rs.WebApplicationException
Specified by:
get in interface javax.ws.rs.client.SyncInvoker
Throws:
javax.ws.rs.ProcessingException
javax.ws.rs.WebApplicationException

get

public <T> T get(javax.ws.rs.core.GenericType<T> responseType)
      throws javax.ws.rs.ProcessingException,
             javax.ws.rs.WebApplicationException
Specified by:
get in interface javax.ws.rs.client.SyncInvoker
Throws:
javax.ws.rs.ProcessingException
javax.ws.rs.WebApplicationException

put

public javax.ws.rs.core.Response put(javax.ws.rs.client.Entity<?> entity)
                              throws javax.ws.rs.ProcessingException
Specified by:
put in interface javax.ws.rs.client.SyncInvoker
Throws:
javax.ws.rs.ProcessingException

put

public <T> T put(javax.ws.rs.client.Entity<?> entity,
                 java.lang.Class<T> responseType)
      throws javax.ws.rs.ProcessingException,
             javax.ws.rs.WebApplicationException
Specified by:
put in interface javax.ws.rs.client.SyncInvoker
Throws:
javax.ws.rs.ProcessingException
javax.ws.rs.WebApplicationException

put

public <T> T put(javax.ws.rs.client.Entity<?> entity,
                 javax.ws.rs.core.GenericType<T> responseType)
      throws javax.ws.rs.ProcessingException,
             javax.ws.rs.WebApplicationException
Specified by:
put in interface javax.ws.rs.client.SyncInvoker
Throws:
javax.ws.rs.ProcessingException
javax.ws.rs.WebApplicationException

post

public javax.ws.rs.core.Response post(javax.ws.rs.client.Entity<?> entity)
                               throws javax.ws.rs.ProcessingException
Specified by:
post in interface javax.ws.rs.client.SyncInvoker
Throws:
javax.ws.rs.ProcessingException

post

public <T> T post(javax.ws.rs.client.Entity<?> entity,
                  java.lang.Class<T> responseType)
       throws javax.ws.rs.ProcessingException,
              javax.ws.rs.WebApplicationException
Specified by:
post in interface javax.ws.rs.client.SyncInvoker
Throws:
javax.ws.rs.ProcessingException
javax.ws.rs.WebApplicationException

post

public <T> T post(javax.ws.rs.client.Entity<?> entity,
                  javax.ws.rs.core.GenericType<T> responseType)
       throws javax.ws.rs.ProcessingException,
              javax.ws.rs.WebApplicationException
Specified by:
post in interface javax.ws.rs.client.SyncInvoker
Throws:
javax.ws.rs.ProcessingException
javax.ws.rs.WebApplicationException

delete

public javax.ws.rs.core.Response delete()
                                 throws javax.ws.rs.ProcessingException
Specified by:
delete in interface javax.ws.rs.client.SyncInvoker
Throws:
javax.ws.rs.ProcessingException

delete

public <T> T delete(java.lang.Class<T> responseType)
         throws javax.ws.rs.ProcessingException,
                javax.ws.rs.WebApplicationException
Specified by:
delete in interface javax.ws.rs.client.SyncInvoker
Throws:
javax.ws.rs.ProcessingException
javax.ws.rs.WebApplicationException

delete

public <T> T delete(javax.ws.rs.core.GenericType<T> responseType)
         throws javax.ws.rs.ProcessingException,
                javax.ws.rs.WebApplicationException
Specified by:
delete in interface javax.ws.rs.client.SyncInvoker
Throws:
javax.ws.rs.ProcessingException
javax.ws.rs.WebApplicationException

head

public javax.ws.rs.core.Response head()
                               throws javax.ws.rs.ProcessingException
Specified by:
head in interface javax.ws.rs.client.SyncInvoker
Throws:
javax.ws.rs.ProcessingException

options

public javax.ws.rs.core.Response options()
                                  throws javax.ws.rs.ProcessingException
Specified by:
options in interface javax.ws.rs.client.SyncInvoker
Throws:
javax.ws.rs.ProcessingException

options

public <T> T options(java.lang.Class<T> responseType)
          throws javax.ws.rs.ProcessingException,
                 javax.ws.rs.WebApplicationException
Specified by:
options in interface javax.ws.rs.client.SyncInvoker
Throws:
javax.ws.rs.ProcessingException
javax.ws.rs.WebApplicationException

options

public <T> T options(javax.ws.rs.core.GenericType<T> responseType)
          throws javax.ws.rs.ProcessingException,
                 javax.ws.rs.WebApplicationException
Specified by:
options in interface javax.ws.rs.client.SyncInvoker
Throws:
javax.ws.rs.ProcessingException
javax.ws.rs.WebApplicationException

trace

public javax.ws.rs.core.Response trace()
                                throws javax.ws.rs.ProcessingException
Specified by:
trace in interface javax.ws.rs.client.SyncInvoker
Throws:
javax.ws.rs.ProcessingException

trace

public <T> T trace(java.lang.Class<T> responseType)
        throws javax.ws.rs.ProcessingException,
               javax.ws.rs.WebApplicationException
Specified by:
trace in interface javax.ws.rs.client.SyncInvoker
Throws:
javax.ws.rs.ProcessingException
javax.ws.rs.WebApplicationException

trace

public <T> T trace(javax.ws.rs.core.GenericType<T> responseType)
        throws javax.ws.rs.ProcessingException,
               javax.ws.rs.WebApplicationException
Specified by:
trace in interface javax.ws.rs.client.SyncInvoker
Throws:
javax.ws.rs.ProcessingException
javax.ws.rs.WebApplicationException

method

public javax.ws.rs.core.Response method(java.lang.String name)
                                 throws javax.ws.rs.ProcessingException
Specified by:
method in interface javax.ws.rs.client.SyncInvoker
Throws:
javax.ws.rs.ProcessingException

method

public <T> T method(java.lang.String name,
                    java.lang.Class<T> responseType)
         throws javax.ws.rs.ProcessingException,
                javax.ws.rs.WebApplicationException
Specified by:
method in interface javax.ws.rs.client.SyncInvoker
Throws:
javax.ws.rs.ProcessingException
javax.ws.rs.WebApplicationException

method

public <T> T method(java.lang.String name,
                    javax.ws.rs.core.GenericType<T> responseType)
         throws javax.ws.rs.ProcessingException,
                javax.ws.rs.WebApplicationException
Specified by:
method in interface javax.ws.rs.client.SyncInvoker
Throws:
javax.ws.rs.ProcessingException
javax.ws.rs.WebApplicationException

method

public javax.ws.rs.core.Response method(java.lang.String name,
                                        javax.ws.rs.client.Entity<?> entity)
                                 throws javax.ws.rs.ProcessingException
Specified by:
method in interface javax.ws.rs.client.SyncInvoker
Throws:
javax.ws.rs.ProcessingException

method

public <T> T method(java.lang.String name,
                    javax.ws.rs.client.Entity<?> entity,
                    java.lang.Class<T> responseType)
         throws javax.ws.rs.ProcessingException,
                javax.ws.rs.WebApplicationException
Specified by:
method in interface javax.ws.rs.client.SyncInvoker
Throws:
javax.ws.rs.ProcessingException
javax.ws.rs.WebApplicationException

method

public <T> T method(java.lang.String name,
                    javax.ws.rs.client.Entity<?> entity,
                    javax.ws.rs.core.GenericType<T> responseType)
         throws javax.ws.rs.ProcessingException,
                javax.ws.rs.WebApplicationException
Specified by:
method in interface javax.ws.rs.client.SyncInvoker
Throws:
javax.ws.rs.ProcessingException
javax.ws.rs.WebApplicationException

property

public JerseyInvocation.Builder property(java.lang.String name,
                                         java.lang.Object value)
Specified by:
property in interface javax.ws.rs.client.Invocation.Builder


Copyright © 2007-2013, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.