org.glassfish.jersey.examples.managedclientsimple.resources
Class StandardResource

java.lang.Object
  extended by org.glassfish.jersey.examples.managedclientsimple.resources.StandardResource

@Path(value="resource")
public class StandardResource
extends Object

Standard example resource exposing GET methods. This resource can be accessed directly by GET and is also accessed from ClientResource using injected client.

Author:
Miroslav Fuksa (miroslav.fuksa at oracle.com)

Constructor Summary
StandardResource()
           
 
Method Summary
 String car(String id)
          Returns resource based on the id which is passed as path parameter.
 String cat()
           
 String elefant()
           
 String get()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StandardResource

public StandardResource()
Method Detail

get

@GET
@Path(value="dog")
public String get()

cat

@GET
@Path(value="cat")
public String cat()

elefant

@GET
@Path(value="elefant")
public String elefant()

car

@GET
@Path(value="car/{id}")
public String car(@PathParam(value="id")
                           String id)
Returns resource based on the id which is passed as path parameter. For purpose of this sample the method just use the path parameter id to construct a string which is returned.

Parameters:
id - Injected path parameter.
Returns:
Resource constructed from given id.


Copyright © 2007-2013, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.