public class HttpLogFilter extends java.lang.Object implements ServiceFilter
ServiceFilter
, der Requests auf
Log.LEVEL_DEBUG
loggt.Constructor and Description |
---|
HttpLogFilter() |
Modifier and Type | Method and Description |
---|---|
void |
init(Config config,
int index)
Quasi-Konstruktor wird von
Osm2poService gerufen. |
void |
postHandle(com.sun.net.httpserver.HttpExchange htx,
boolean success)
Wird vor dem Schreiben von HTTP-Header und -Response gerufen.
|
boolean |
preHandle(com.sun.net.httpserver.HttpExchange htx,
java.lang.String target)
Filtert einen HTTP-Request vor der Verarbeitung.
|
void |
shutDown()
Signal, dass Server gleich runterfaehrt.
|
public void init(Config config, int index)
ServiceFilter
Osm2poService
gerufen.init
in interface ServiceFilter
config
- Config
index
- int Index in der Konfigurationpublic void shutDown()
ServiceFilter
shutDown
in interface ServiceFilter
public boolean preHandle(com.sun.net.httpserver.HttpExchange htx, java.lang.String target) throws java.lang.Exception
ServiceFilter
preHandle
in interface ServiceFilter
htx
- HttpExchange
target
- optional name of the requested resourceServiceException
- z.B. ServiceException
/ Auth-Fehlerjava.lang.Exception
public void postHandle(com.sun.net.httpserver.HttpExchange htx, boolean success)
ServiceFilter
postHandle
in interface ServiceFilter
htx
- HttpExchange
success
- true: Response fehlerfrei erstellt, HTTP 200 wird gesendet.