public class LogFilter extends Filter
| Modifier and Type | Field and Description |
|---|---|
protected LogService |
logService
The log service.
|
protected Template |
logTemplate
The log template to use.
|
| Constructor and Description |
|---|
LogFilter(Context context,
LogService logService)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
afterHandle(Request request,
Response response)
Allows filtering after processing by the next Restlet.
|
protected int |
beforeHandle(Request request,
Response response)
Allows filtering before processing by the next Restlet.
|
protected java.lang.String |
format(Request request,
Response response)
Format a log entry.
|
protected java.lang.String |
formatDefault(Request request,
Response response,
int duration)
Format a log entry using the default format.
|
doHandle, getNext, handle, hasNext, setNext, setNext, start, stopfinalize, getApplication, getAuthor, getContext, getDescription, getLogger, getName, getOwner, isStarted, isStopped, setAuthor, setContext, setDescription, setName, setOwnerprotected volatile LogService logService
protected volatile Template logTemplate
public LogFilter(Context context, LogService logService)
context - The context.logService - The log service descriptor.protected void afterHandle(Request request, Response response)
afterHandle in class Filterrequest - The request to handle.response - The response to update.protected int beforeHandle(Request request, Response response)
beforeHandle in class Filterrequest - The request to handle.response - The response to update.protected java.lang.String format(Request request, Response response)
request - The request to log.response - The response to log.protected java.lang.String formatDefault(Request request, Response response, int duration)
request - The request to log.response - The response to log.duration - The call duration (in milliseconds).Copyright © 2005-2012. All Rights Reserved.