Class JaxRsResource
- java.lang.Object
-
- net.officefloor.tutorial.jaxrsapp.JaxRsResource
-
@Path("/jaxrs") public class JaxRsResource extends java.lang.Object
JAX-RS resource.- Author:
- Daniel Sagenschneider
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
JaxRsResource.JaxRsSubResource
-
Constructor Summary
Constructors Constructor Description JaxRsResource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
asyncAsynchronous(javax.ws.rs.container.AsyncResponse async)
void
asyncException(javax.ws.rs.container.AsyncResponse async)
void
asyncSynchronous(javax.ws.rs.container.AsyncResponse async)
java.lang.String
checkedException()
java.lang.String
context(JaxRsDependency dependency)
java.lang.String
cookieParam(java.lang.String param)
java.lang.String
formParam(java.lang.String param)
java.lang.String
get()
java.lang.String
headerParam(java.lang.String param)
java.lang.String
httpHeaders(javax.ws.rs.core.HttpHeaders headers)
java.lang.String
inject()
JsonResponse
json(JsonRequest request)
java.lang.String
pathParam(java.lang.String param)
java.lang.String
queryParam(java.lang.String param)
JaxRsResource.JaxRsSubResource
subResource()
java.lang.String
uncheckedException()
java.lang.String
uriInfo(javax.ws.rs.core.UriInfo info)
-
-
-
Method Detail
-
inject
@GET @Path("/inject") public java.lang.String inject()
-
pathParam
@GET @Path("/path/{param}") public java.lang.String pathParam(@PathParam("param") java.lang.String param)
-
json
@POST @Path("/json") @Consumes("application/json") @Produces("application/json") public JsonResponse json(JsonRequest request)
-
get
@GET public java.lang.String get()
-
queryParam
@GET @Path("/query") public java.lang.String queryParam(@DefaultValue("default") @QueryParam("param") java.lang.String param)
-
headerParam
@GET @Path("/header") public java.lang.String headerParam(@HeaderParam("param") java.lang.String param)
-
cookieParam
@GET @Path("/cookie") public java.lang.String cookieParam(@CookieParam("param") java.lang.String param)
-
formParam
@POST @Path("/form") @Consumes("application/x-www-form-urlencoded") public java.lang.String formParam(@FormParam("param") java.lang.String param)
-
uriInfo
@GET @Path("/uriInfo/{param}") public java.lang.String uriInfo(@Context javax.ws.rs.core.UriInfo info)
-
httpHeaders
@GET @Path("/headers") public java.lang.String httpHeaders(@Context javax.ws.rs.core.HttpHeaders headers)
-
context
@GET @Path("/context") public java.lang.String context(@Context JaxRsDependency dependency)
-
subResource
@Path("/sub") public JaxRsResource.JaxRsSubResource subResource()
-
asyncSynchronous
@GET @Path("/async/synchronous") public void asyncSynchronous(@Suspended javax.ws.rs.container.AsyncResponse async)
-
asyncAsynchronous
@GET @Path("/async/asynchronous") public void asyncAsynchronous(@Suspended javax.ws.rs.container.AsyncResponse async)
-
checkedException
@GET @Path("/exception/checked") public java.lang.String checkedException() throws java.lang.Exception
- Throws:
java.lang.Exception
-
uncheckedException
@GET @Path("/exception/unchecked") public java.lang.String uncheckedException()
-
asyncException
@GET @Path("/exception/async") public void asyncException(@Suspended javax.ws.rs.container.AsyncResponse async)
-
-