org.glassfish.jersey.client
Class JerseyClient

java.lang.Object
  extended by org.glassfish.jersey.client.JerseyClient
All Implemented Interfaces:
Client

public class JerseyClient
extends java.lang.Object
implements Client

Jersey implementation of JAX-RS JerseyClient contract.

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

Nested Class Summary
static class JerseyClient.Builder
          Jersey client instance builder.
 
Constructor Summary
protected JerseyClient(JerseyConfiguration configuration, Inflector<Request,Response> connector, java.util.List<org.glassfish.hk2.Module> customModules)
          Create a new Jersey client instance.
 
Method Summary
 void close()
           
 JerseyConfiguration configuration()
           
 Invocation invocation(Link link)
           
 Invocation invocation(Link link, Entity<?> entity)
           
 boolean isClosed()
          Check client state.
 Target target(Link link)
           
 Target target(java.lang.String uri)
           
 Target target(java.net.URI uri)
           
 Target target(UriBuilder uriBuilder)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JerseyClient

protected JerseyClient(JerseyConfiguration configuration,
                       Inflector<Request,Response> connector,
                       java.util.List<org.glassfish.hk2.Module> customModules)
Create a new Jersey client instance.

Parameters:
configuration - jersey client configuration.
connector - transport connector. If null, the default transport will be used.
customModules - custom HK2 modules to be registered with the client.
Method Detail

close

public void close()
Specified by:
close in interface Client

isClosed

public boolean isClosed()
Check client state.

Returns:
true if current JerseyClient instance is closed, otherwise false.
See Also:
close()

configuration

public JerseyConfiguration configuration()
Specified by:
configuration in interface Client

target

public Target target(java.lang.String uri)
              throws java.lang.IllegalArgumentException,
                     java.lang.NullPointerException
Specified by:
target in interface Client
Throws:
java.lang.IllegalArgumentException
java.lang.NullPointerException

target

public Target target(java.net.URI uri)
              throws java.lang.NullPointerException
Specified by:
target in interface Client
Throws:
java.lang.NullPointerException

target

public Target target(UriBuilder uriBuilder)
              throws java.lang.NullPointerException
Specified by:
target in interface Client
Throws:
java.lang.NullPointerException

target

public Target target(Link link)
              throws java.lang.NullPointerException
Specified by:
target in interface Client
Throws:
java.lang.NullPointerException

invocation

public Invocation invocation(Link link)
                      throws java.lang.NullPointerException,
                             java.lang.IllegalArgumentException
Specified by:
invocation in interface Client
Throws:
java.lang.NullPointerException
java.lang.IllegalArgumentException

invocation

public Invocation invocation(Link link,
                             Entity<?> entity)
                      throws java.lang.NullPointerException,
                             java.lang.IllegalArgumentException
Specified by:
invocation in interface Client
Throws:
java.lang.NullPointerException
java.lang.IllegalArgumentException


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