de.lmu.ifi.pst.x10080133.monitor
Class AppMonitor

java.lang.Object
  extended by de.lmu.ifi.pst.x10080133.monitor.AppMonitor
All Implemented Interfaces:
javax.servlet.Filter

public class AppMonitor
extends java.lang.Object
implements javax.servlet.Filter

Manages every protected request, needs to be registered in deployment descriptor on url-pattern /protected/*

Author:
Roman.Schwienbacher

Field Summary
private  javax.servlet.FilterConfig config
           
private  org.apache.commons.logging.Log log
           
static java.lang.String MESSAGE_KEY
           
static java.lang.String PRE_VISITED_KEY
           
static java.lang.String REQ_LOCATION_KEY
           
static java.lang.String ROLES_KEY
           
static java.lang.String USERNAME_KEY
           
 
Constructor Summary
AppMonitor()
           
 
Method Summary
 void destroy()
           
 void doFilter(javax.servlet.ServletRequest req, javax.servlet.ServletResponse resp, javax.servlet.FilterChain chain)
          called at every request, handles corresponding redirecting by the SecurityProvider
 javax.servlet.FilterConfig getConfig()
           
 void init(javax.servlet.FilterConfig config)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private final org.apache.commons.logging.Log log

USERNAME_KEY

public static final java.lang.String USERNAME_KEY
See Also:
Constant Field Values

ROLES_KEY

public static final java.lang.String ROLES_KEY
See Also:
Constant Field Values

PRE_VISITED_KEY

public static final java.lang.String PRE_VISITED_KEY
See Also:
Constant Field Values

REQ_LOCATION_KEY

public static final java.lang.String REQ_LOCATION_KEY
See Also:
Constant Field Values

MESSAGE_KEY

public static final java.lang.String MESSAGE_KEY
See Also:
Constant Field Values

config

private javax.servlet.FilterConfig config
Constructor Detail

AppMonitor

public AppMonitor()
Method Detail

doFilter

public void doFilter(javax.servlet.ServletRequest req,
                     javax.servlet.ServletResponse resp,
                     javax.servlet.FilterChain chain)
              throws java.io.IOException,
                     javax.servlet.ServletException
called at every request, handles corresponding redirecting by the SecurityProvider

Specified by:
doFilter in interface javax.servlet.Filter
Throws:
java.io.IOException
javax.servlet.ServletException

getConfig

public javax.servlet.FilterConfig getConfig()

init

public void init(javax.servlet.FilterConfig config)
          throws javax.servlet.ServletException
Specified by:
init in interface javax.servlet.Filter
Throws:
javax.servlet.ServletException

destroy

public void destroy()
Specified by:
destroy in interface javax.servlet.Filter