tom | 0eb04ca | 2014-08-25 14:34:51 -0700 | [diff] [blame] | 1 | package org.onlab.onos.gui; |
| 2 | |
tom | 5ac5188 | 2014-08-27 18:10:33 -0700 | [diff] [blame^] | 3 | import org.onlab.onos.GreetService; |
tom | 0eb04ca | 2014-08-25 14:34:51 -0700 | [diff] [blame] | 4 | import org.onlab.rest.BaseResource; |
| 5 | |
| 6 | import javax.ws.rs.DefaultValue; |
| 7 | import javax.ws.rs.GET; |
| 8 | import javax.ws.rs.Path; |
| 9 | import javax.ws.rs.QueryParam; |
| 10 | import javax.ws.rs.core.Response; |
| 11 | |
| 12 | /** |
| 13 | * Simple example of a GUI JAX-RS resource. |
| 14 | */ |
| 15 | @Path("greet") |
| 16 | public class GreetResource extends BaseResource { |
| 17 | |
| 18 | @GET |
| 19 | public Response yo(@QueryParam("name") @DefaultValue("dude") String name) { |
| 20 | return Response.ok(get(GreetService.class).yo(name)).build(); |
| 21 | } |
| 22 | |
| 23 | } |