|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.wink.client.RestClient
public class RestClient
The RestClient is the entry point for all rest service operations. The
RestClient is used to create instances of Resource
classes that are
used to make the actual invocations to the service. The client can be
initialized with a user supplied configuration to specify custom Provider
classes, in addition to other configuration options.
// create the client RestClient client = new RestClient(); // create the resource to make invocations on Resource resource = client.resource("http://myhost:80/my/service"); // invoke GET on the resource and receive the response entity as a string String entity = resource.get(String.class); ...
Constructor Summary | |
---|---|
RestClient()
Construct a new RestClient using the default client configuration |
|
RestClient(ClientConfig config)
Construct a new RestClient using the supplied configuration |
Method Summary | |
---|---|
ClientConfig |
getConfig()
Get the unmodifiable client configuration |
Resource |
resource(java.lang.String uri)
Create a new Resource instance |
Resource |
resource(java.net.URI uri)
Create a new Resource instance |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RestClient()
public RestClient(ClientConfig config)
config
- the client configurationMethod Detail |
---|
public ClientConfig getConfig()
public Resource resource(java.net.URI uri)
Resource
instance
uri
- uri of the resource to create
Resource
instance attached to the specified uripublic Resource resource(java.lang.String uri)
Resource
instance
uri
- uri of the resource to create
Resource
instance attached to the specified uri
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |