@Path(value="/secure/") public class SecureApiController extends Controller
@Path| Constructor and Description |
|---|
SecureApiController() |
| Modifier and Type | Method and Description |
|---|---|
Item |
get(int id,
fathom.realm.Account account)
Responds to a GET request of an integer id like "/secure/1".
|
getContext, getRequest, getResponse, redirectTo, setContextpublic Item get(int id, fathom.realm.Account account)
Notice that the id parameter is specified in the
@GET annotation and in the method signature.
This technique is relying on use of the Java 8 -parameters
flag passed to javac. That flag preserves method parameter
names in the compiled class files.
This same technique is applied to the @Subject annotation which
references an object in the current session named "subject".
id - account - Copyright © 2015. All rights reserved.