public class BaseRestClient extends Object
Subclasses can use these operations to provide an API-like view of the REST model
| Constructor and Description |
|---|
BaseRestClient(com.sun.jersey.api.client.Client client) |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
exec(HttpVerb method,
com.sun.jersey.api.client.WebResource resource,
Class<T> c)
Execute the operation.
|
<T> T |
exec(HttpVerb method,
com.sun.jersey.api.client.WebResource resource,
com.sun.jersey.api.client.GenericType<T> t)
Execute the operation.
|
<T> T |
get(com.sun.jersey.api.client.WebResource resource,
Class<T> c)
Execute the GET operation.
|
com.sun.jersey.api.client.Client |
getClient()
Get the jersey client
|
com.sun.jersey.api.client.WebResource |
resource(String url)
Create a Web resource from the client.
|
com.sun.jersey.api.client.WebResource |
resource(URI u)
Create a Web resource from the client.
|
public com.sun.jersey.api.client.Client getClient()
public <T> T exec(HttpVerb method, com.sun.jersey.api.client.WebResource resource, Class<T> c) throws IOException
T - type expectedmethod - method to executeresource - resource to work againstc - class to buildIOException - on any failurepublic <T> T exec(HttpVerb method, com.sun.jersey.api.client.WebResource resource, com.sun.jersey.api.client.GenericType<T> t) throws IOException
T - type expectedmethod - method to executeresource - resource to work againstt - type to work withIOException - on any failurepublic <T> T get(com.sun.jersey.api.client.WebResource resource,
Class<T> c)
throws IOException
T - type expectedresource - resource to work againstc - class to buildIOException - on any failurepublic com.sun.jersey.api.client.WebResource resource(URI u)
u - the URI of the resource.public com.sun.jersey.api.client.WebResource resource(String url)
u - the URI of the resource.Copyright © 2014–2015 The Apache Software Foundation. All rights reserved.