@Path(value="/hello-world") @Produces(value="application/json") public class HelloWorldResource extends Object
Constructor and Description |
---|
HelloWorldResource(Template template) |
Modifier and Type | Method and Description |
---|---|
String |
receiveDate(Optional<DateTimeParam> dateTimeParam) |
void |
receiveHello(Saying saying) |
Saying |
sayHello(Optional<String> name) |
public HelloWorldResource(Template template)
@GET @Timed(name="get-requests-timed") @Metered(name="get-requests-metered") @CacheControl(maxAge=1, maxAgeUnit=DAYS) public Saying sayHello(@QueryParam(value="name") Optional<String> name)
@POST public void receiveHello(Saying saying)
@GET @Path(value="/date") @Produces(value="text/plain") public String receiveDate(@QueryParam(value="date") Optional<DateTimeParam> dateTimeParam)
Copyright © 2011. All rights reserved.