|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--juju.reattore.server.intercept.impl.VelocityInterceptor
Interceptor that serves a Apache Velocity based template.
Constructor Summary | |
VelocityInterceptor()
Create a new interceptor |
Method Summary | |
protected boolean |
populateContext(org.apache.velocity.VelocityContext ctx,
HttpRequest req,
HttpResponse resp)
Hook to allow a derrived class to add extra items to the context. |
boolean |
process(HttpRequest req,
HttpResponse resp)
Process an incoming HTTP request if possible, filling in the given response as it goes. |
void |
setLockedPath(java.lang.String path)
Lock this interceptor to only ever return the contents of the given path no matter what the request. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public VelocityInterceptor()
Method Detail |
public void setLockedPath(java.lang.String path)
path
- The path to lock to, or null to clear.protected boolean populateContext(org.apache.velocity.VelocityContext ctx, HttpRequest req, HttpResponse resp)
ctx
- Main contextreq
- Incoming requestresp
- Outgoing response
public boolean process(HttpRequest req, HttpResponse resp)
Interceptor
process
in interface Interceptor
req
- HTTP request to processresp
- Response to fill in
Interceptor
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |