|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.jersey.client.JerseyClient
public class JerseyClient
Jersey implementation of JAX-RS JerseyClient
contract.
| 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()
Close client instance and all it's associated resources. |
ClientConfig |
configuration()
Get access to the underlying configuration of the
client instance. |
JerseyInvocation.Builder |
invocation(Link link)
Build an invocation builder from a link. |
boolean |
isClosed()
Check client state. |
JerseyWebTarget |
target(Link link)
Build a new web resource target. |
JerseyWebTarget |
target(java.lang.String uri)
Build a new web resource target. |
JerseyWebTarget |
target(java.net.URI uri)
Build a new web resource target. |
JerseyWebTarget |
target(UriBuilder uriBuilder)
Build a new web resource target. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected JerseyClient()
protected JerseyClient(Configurable configuration)
configuration - jersey client configuration.| Method Detail |
|---|
public void close()
ClientIllegalStateException
being thrown.
Calling this method effectively invalidates all resource targets
produced by the client instance. Invoking any method on such targets once the client
is closed would result in an IllegalStateException being thrown.
close in interface Clientpublic void addListener(org.glassfish.jersey.client.JerseyClient.LifecycleListener listener)
listener - client lifecycle listener.public boolean isClosed()
true if current JerseyClient instance is closed, otherwise false.close()public ClientConfig configuration()
Clientconfiguration of the
client instance.
configuration in interface Client
public JerseyWebTarget target(java.lang.String uri)
throws java.lang.IllegalArgumentException,
java.lang.NullPointerException
Client
target in interface Clienturi - web resource URI. May contain template parameters. Must not be null.
java.lang.IllegalArgumentException - in case the supplied string is not a valid URI template.
java.lang.NullPointerException - in case the supplied argument is null.
public JerseyWebTarget target(java.net.URI uri)
throws java.lang.NullPointerException
Client
target in interface Clienturi - web resource URI. Must not be null.
java.lang.NullPointerException - in case the supplied argument is null.
public JerseyWebTarget target(UriBuilder uriBuilder)
throws java.lang.NullPointerException
Client
target in interface ClienturiBuilder - web resource URI represented as URI builder. Must not be null.
java.lang.NullPointerException - in case the supplied argument is null.
public JerseyWebTarget target(Link link)
throws java.lang.NullPointerException
Client
target in interface Clientlink - link to a web resource. Must not be null.
java.lang.NullPointerException - in case the supplied argument is null.
public JerseyInvocation.Builder invocation(Link link)
throws java.lang.NullPointerException,
java.lang.IllegalArgumentException
ClientBuild an invocation builder from a link. It uses the URI and the type of the link to initialize the invocation builder. The type is used as the initial value for the HTTP Accept header, if present.
invocation in interface Clientlink - link to build invocation from. Must not be null.
java.lang.NullPointerException - in case link is null.
java.lang.IllegalArgumentException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||