|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.glassfish.jersey.examples.managedbeans.resources.ManagedBeanSingletonResource
@Path(value="/managedbean/singleton") @Singleton public class ManagedBeanSingletonResource
JAX-RS root resource treated as Java EE managed bean in singleton scope.
| Constructor Summary | |
|---|---|
ManagedBeanSingletonResource()
|
|
| Method Summary | |
|---|---|
void |
deleteWidget(int id)
Remove widget with given id. |
String |
getException()
Throw a runtime exception, so that it could be mapped. |
String |
getMessage()
Provide textual representation of the internal counter. |
String |
getWidget(int id)
Get JPA widget value. |
void |
putMessage(int i)
Reset internal counter. |
void |
putWidget(int id,
String val)
Set new widget value. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ManagedBeanSingletonResource()
| Method Detail |
|---|
@GET @Produces(value="text/plain") public String getMessage()
@PUT @Produces(value="text/plain") public void putMessage(int i)
i - new counter value to be set.@Path(value="exception") public String getException()
@Path(value="widget/{id: \\d+}")
@GET
public String getWidget(@PathParam(value="id")
int id)
id - widget id.
@Path(value="widget/{id: \\d+}")
@PUT
public void putWidget(@PathParam(value="id")
int id,
String val)
id - widget id.val - new value to be associated with above specified id.
@Path(value="widget/{id: \\d+}")
@DELETE
public void deleteWidget(@PathParam(value="id")
int id)
id - id of the widget to be removed.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||