org.glassfish.jersey.client
Class JerseyInvocation

java.lang.Object
  extended by org.glassfish.jersey.client.JerseyInvocation
All Implemented Interfaces:
Invocation, Configurable<Invocation>

public class JerseyInvocation
extends Object
implements Invocation

Jersey implementation of JAX-RS client-side request invocation contract.

Author:
Marek Potociar (marek.potociar at oracle.com)

Nested Class Summary
static class JerseyInvocation.Builder
          Jersey-specific client invocation builder.
 
Method Summary
 ClientConfig getConfiguration()
           
 Response invoke()
           
<T> T
invoke(Class<T> responseType)
           
<T> T
invoke(GenericType<T> responseType)
           
 JerseyInvocation preInitialize()
          Pre initializes the configuration of this invocation in order to improve performance during the first request.
 JerseyInvocation property(String name, Object value)
           
 JerseyInvocation register(Class<?> providerClass)
           
 JerseyInvocation register(Class<?> providerClass, Class<?>... contracts)
           
 JerseyInvocation register(Class<?> providerClass, int bindingPriority)
           
 JerseyInvocation register(Class<?> providerClass, Map<Class<?>,Integer> contracts)
           
 JerseyInvocation register(Object provider)
           
 JerseyInvocation register(Object provider, Class<?>... contracts)
           
 JerseyInvocation register(Object provider, int bindingPriority)
           
 JerseyInvocation register(Object provider, Map<Class<?>,Integer> contracts)
           
 JerseyInvocation replaceWith(Configuration config)
           
 Future<Response> submit()
           
<T> Future<T>
submit(Class<T> responseType)
           
<T> Future<T>
submit(GenericType<T> responseType)
           
<T> Future<T>
submit(InvocationCallback<T> callback)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

invoke

public Response invoke()
                throws ProcessingException,
                       WebApplicationException
Specified by:
invoke in interface Invocation
Throws:
ProcessingException
WebApplicationException

invoke

public <T> T invoke(Class<T> responseType)
         throws ProcessingException,
                WebApplicationException
Specified by:
invoke in interface Invocation
Throws:
ProcessingException
WebApplicationException

invoke

public <T> T invoke(GenericType<T> responseType)
         throws ProcessingException,
                WebApplicationException
Specified by:
invoke in interface Invocation
Throws:
ProcessingException
WebApplicationException

submit

public Future<Response> submit()
Specified by:
submit in interface Invocation

submit

public <T> Future<T> submit(Class<T> responseType)
Specified by:
submit in interface Invocation

submit

public <T> Future<T> submit(GenericType<T> responseType)
Specified by:
submit in interface Invocation

submit

public <T> Future<T> submit(InvocationCallback<T> callback)
Specified by:
submit in interface Invocation

property

public JerseyInvocation property(String name,
                                 Object value)
Specified by:
property in interface Configurable<Invocation>

register

public JerseyInvocation register(Class<?> providerClass)
Specified by:
register in interface Configurable<Invocation>

register

public JerseyInvocation register(Class<?> providerClass,
                                 int bindingPriority)
Specified by:
register in interface Configurable<Invocation>

register

public JerseyInvocation register(Class<?> providerClass,
                                 Class<?>... contracts)
Specified by:
register in interface Configurable<Invocation>

register

public JerseyInvocation register(Class<?> providerClass,
                                 Map<Class<?>,Integer> contracts)
Specified by:
register in interface Configurable<Invocation>

register

public JerseyInvocation register(Object provider)
Specified by:
register in interface Configurable<Invocation>

register

public JerseyInvocation register(Object provider,
                                 int bindingPriority)
Specified by:
register in interface Configurable<Invocation>

register

public JerseyInvocation register(Object provider,
                                 Class<?>... contracts)
Specified by:
register in interface Configurable<Invocation>

register

public JerseyInvocation register(Object provider,
                                 Map<Class<?>,Integer> contracts)
Specified by:
register in interface Configurable<Invocation>

replaceWith

public JerseyInvocation replaceWith(Configuration config)
Specified by:
replaceWith in interface Configurable<Invocation>

getConfiguration

public ClientConfig getConfiguration()
Specified by:
getConfiguration in interface Configurable<Invocation>

preInitialize

public JerseyInvocation preInitialize()
Pre initializes the configuration of this invocation in order to improve performance during the first request.

Once this method is called no other method implementing Configurable should be called on this pre initialized invocation builder otherwise invocation will change back to uninitialized.

Returns:
Jersey invocation.


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