public abstract class AbstractThrottledSubmissionHandlerInterceptorAdapter
extends org.springframework.web.servlet.handler.HandlerInterceptorAdapter
implements org.springframework.beans.factory.InitializingBean
| Modifier and Type | Field and Description |
|---|---|
protected org.slf4j.Logger |
log |
| Constructor and Description |
|---|
AbstractThrottledSubmissionHandlerInterceptorAdapter() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
protected abstract boolean |
exceedsThreshold(javax.servlet.http.HttpServletRequest request) |
protected int |
getFailureRangeInSeconds() |
protected int |
getFailureThreshold() |
protected double |
getThresholdRate() |
protected String |
getUsernameParameter() |
void |
postHandle(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Object o,
org.springframework.web.servlet.ModelAndView modelAndView) |
boolean |
preHandle(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Object o) |
protected abstract void |
recordSubmissionFailure(javax.servlet.http.HttpServletRequest request) |
protected void |
recordThrottle(javax.servlet.http.HttpServletRequest request) |
void |
setFailureRangeInSeconds(int failureRangeInSeconds) |
void |
setFailureThreshold(int failureThreshold) |
void |
setUsernameParameter(String usernameParameter) |
public AbstractThrottledSubmissionHandlerInterceptorAdapter()
public void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanExceptionpublic final boolean preHandle(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Object o)
throws Exception
preHandle in interface org.springframework.web.servlet.HandlerInterceptorpreHandle in class org.springframework.web.servlet.handler.HandlerInterceptorAdapterExceptionpublic final void postHandle(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Object o,
org.springframework.web.servlet.ModelAndView modelAndView)
throws Exception
postHandle in interface org.springframework.web.servlet.HandlerInterceptorpostHandle in class org.springframework.web.servlet.handler.HandlerInterceptorAdapterExceptionpublic final void setFailureThreshold(int failureThreshold)
public final void setFailureRangeInSeconds(int failureRangeInSeconds)
public final void setUsernameParameter(String usernameParameter)
protected double getThresholdRate()
protected int getFailureThreshold()
protected int getFailureRangeInSeconds()
protected String getUsernameParameter()
protected void recordThrottle(javax.servlet.http.HttpServletRequest request)
protected abstract void recordSubmissionFailure(javax.servlet.http.HttpServletRequest request)
protected abstract boolean exceedsThreshold(javax.servlet.http.HttpServletRequest request)
Copyright © 2004-2012 Jasig. All Rights Reserved.