|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.glassfish.jersey.examples.managedclientsimple.resources.ClientResource
@Path(value="client") public class ClientResource
A resource which use managed client injected by @Uri annotation to query
external resources and resource from StandardResource.
| Constructor Summary | |
|---|---|
ClientResource()
|
|
| Method Summary | |
|---|---|
String |
animals(javax.ws.rs.client.WebTarget dogWebTarget,
javax.ws.rs.client.WebTarget catWebTarget,
javax.ws.rs.client.WebTarget elefantWebTarget)
Query StandardResource and return result based on the results from methods of the StandardResource. |
String |
car(javax.ws.rs.client.WebTarget webTarget,
String id)
Query StandardResource using a injected client. |
javax.ws.rs.core.Response |
glassfish(javax.ws.rs.client.WebTarget webTarget)
Make request to external web site using injected client. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ClientResource()
| Method Detail |
|---|
@GET
@Produces(value="text/html")
@Path(value="glassfish")
public javax.ws.rs.core.Response glassfish(@Uri(value="http://glassfish.java.net/")
javax.ws.rs.client.WebTarget webTarget)
webTarget - Injected web target.
@GET
@Produces(value="text/plain")
@Path(value="animals")
public String animals(@Uri(value="resource/dog")
javax.ws.rs.client.WebTarget dogWebTarget,
@Uri(value="resource/cat")
javax.ws.rs.client.WebTarget catWebTarget,
@Uri(value="resource/elefant")
javax.ws.rs.client.WebTarget elefantWebTarget)
StandardResource and return result based on the results from methods of the StandardResource.
dogWebTarget - Injected client.catWebTarget - Injected client.elefantWebTarget - Injected client.
@GET
@Produces(value="text/plain")
@Path(value="car/{id}")
public String car(@Uri(value="resource/car/{id}")
javax.ws.rs.client.WebTarget webTarget,
@PathParam(value="id")
String id)
StandardResource using a injected client. The client injection is using a template parameter id
which is filled by JAX-RS implementation using a path parameter of this resource method.
webTarget - Injected client.id - Path parameter.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||