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)

Constructor Summary
protected JerseyClient()
          Create a new Jersey client instance using a default configuration.
protected JerseyClient(Configurable configuration)
          Create a new Jersey client instance.
 
Method Summary
 void addListener(org.glassfish.jersey.client.JerseyClient.LifecycleListener listener)
          Add a new client lifecycle listener.
 void close()
           
 ClientConfig configuration()
           
 JerseyInvocation.Builder invocation(Link link)
           
 boolean isClosed()
          Check client state.
 JerseyWebTarget target(Link link)
           
 JerseyWebTarget target(java.lang.String uri)
           
 JerseyWebTarget target(java.net.URI uri)
           
 JerseyWebTarget 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()
Create a new Jersey client instance using a default configuration.


JerseyClient

protected JerseyClient(Configurable configuration)
Create a new Jersey client instance.

Parameters:
configuration - jersey client configuration.
Method Detail

close

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

addListener

public void addListener(org.glassfish.jersey.client.JerseyClient.LifecycleListener listener)
Add a new client lifecycle listener.

Parameters:
listener - client lifecycle listener.

isClosed

public boolean isClosed()
Check client state.

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

configuration

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

target

public JerseyWebTarget 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 JerseyWebTarget target(java.net.URI uri)
                       throws java.lang.NullPointerException
Specified by:
target in interface Client
Throws:
java.lang.NullPointerException

target

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

target

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

invocation

public JerseyInvocation.Builder invocation(Link link)
                                    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.