org.jasig.cas.web.support
Class AbstractThrottledSubmissionHandlerInterceptorAdapter
java.lang.Object
org.springframework.web.servlet.handler.HandlerInterceptorAdapter
org.jasig.cas.web.support.AbstractThrottledSubmissionHandlerInterceptorAdapter
- All Implemented Interfaces:
- org.springframework.beans.factory.InitializingBean, org.springframework.web.servlet.HandlerInterceptor
- Direct Known Subclasses:
- AbstractInMemoryThrottledSubmissionHandlerInterceptorAdapter, InspektrThrottledSubmissionByIpAddressAndUsernameHandlerInterceptorAdapter
public abstract class AbstractThrottledSubmissionHandlerInterceptorAdapter
- extends org.springframework.web.servlet.handler.HandlerInterceptorAdapter
- implements org.springframework.beans.factory.InitializingBean
Abstract implementation of the handler that has all of the logic. Encapsulates the logic in case we get it wrong!
- Since:
- 3.3.5
- Version:
- $Revision$ $Date$
- Author:
- Scott Battaglia
|
Field Summary |
protected org.slf4j.Logger |
log
|
| Methods inherited from class org.springframework.web.servlet.handler.HandlerInterceptorAdapter |
afterCompletion |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
protected final org.slf4j.Logger log
AbstractThrottledSubmissionHandlerInterceptorAdapter
public AbstractThrottledSubmissionHandlerInterceptorAdapter()
afterPropertiesSet
public void afterPropertiesSet()
throws Exception
- Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
- Throws:
Exception
preHandle
public final boolean preHandle(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Object o)
throws Exception
- Specified by:
preHandle in interface org.springframework.web.servlet.HandlerInterceptor- Overrides:
preHandle in class org.springframework.web.servlet.handler.HandlerInterceptorAdapter
- Throws:
Exception
postHandle
public final void postHandle(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Object o,
org.springframework.web.servlet.ModelAndView modelAndView)
throws Exception
- Specified by:
postHandle in interface org.springframework.web.servlet.HandlerInterceptor- Overrides:
postHandle in class org.springframework.web.servlet.handler.HandlerInterceptorAdapter
- Throws:
Exception
setFailureThreshold
public final void setFailureThreshold(int failureThreshold)
setFailureRangeInSeconds
public final void setFailureRangeInSeconds(int failureRangeInSeconds)
setUsernameParameter
public final void setUsernameParameter(String usernameParameter)
getThresholdRate
protected double getThresholdRate()
getFailureThreshold
protected int getFailureThreshold()
getFailureRangeInSeconds
protected int getFailureRangeInSeconds()
getUsernameParameter
protected String getUsernameParameter()
recordThrottle
protected void recordThrottle(javax.servlet.http.HttpServletRequest request)
recordSubmissionFailure
protected abstract void recordSubmissionFailure(javax.servlet.http.HttpServletRequest request)
exceedsThreshold
protected abstract boolean exceedsThreshold(javax.servlet.http.HttpServletRequest request)
Copyright © 2004-2013 Jasig. All Rights Reserved.