public class ExpiryHandler extends AbstractHttpHandler
Constructor and Description |
---|
ExpiryHandler() |
Modifier and Type | Method and Description |
---|---|
void |
handle(String pathInContext,
String pathParams,
HttpRequest request,
HttpResponse response)
Handle a request by pre-populating the Expires header with a a value
that corresponds to now + ttl.
|
void |
setTimeToLive(long ttl)
Set the default expiry time in seconds.
|
getHttpContext, getName, handleTrace, initialize, isStarted, setName, start, stop, toString
public void setTimeToLive(long ttl)
ttl
- The default time to live in seconds. If negative (the
default) then all content will be set to expire 01Jan1970 by default.public void handle(String pathInContext, String pathParams, HttpRequest request, HttpResponse response) throws HttpException, IOException
pathInContext
- The context pathpathParams
- Path parameters such as encoded Session IDrequest
- The HttpRequest requestresponse
- The HttpResponse responseHttpException
IOException
Copyright © 2013. All rights reserved.