Package com.smartfoxserver.v2.util
Interface IFloodFilter<T>
-
- All Superinterfaces:
com.smartfoxserver.v2.core.ICoreService
,com.smartfoxserver.bitswarm.service.IService
- All Known Implementing Classes:
SFSFloodFilter
public interface IFloodFilter<T> extends com.smartfoxserver.v2.core.ICoreService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addRequestFilter(T request, int reqPerSecond)
void
clearAllFilters()
void
filterRequest(T reqType, User user)
int
getBanDurationMinutes()
java.lang.String
getBanMessage()
BanMode
getBanMode()
int
getMaxFloodingAttempts()
java.util.Map<T,java.lang.Integer>
getRequestTable()
int
getSecondsBeforeBan()
boolean
isLogFloodingAttempts()
boolean
isRequestFiltered(T request)
void
setActive(boolean flag)
void
setBanDurationMinutes(int banDurationMinutes)
void
setBanMessage(java.lang.String banMessage)
void
setBanMode(BanMode banMode)
void
setLogFloodingAttempts(boolean logFloodingAttempts)
void
setMaxFloodingAttempts(int maxFloodingAttempts)
void
setSecondsBeforeBan(int secondsBeforeBan)
-
-
-
Method Detail
-
setActive
void setActive(boolean flag)
-
filterRequest
void filterRequest(T reqType, User user) throws SFSFloodingException
- Throws:
SFSFloodingException
-
addRequestFilter
void addRequestFilter(T request, int reqPerSecond)
-
isRequestFiltered
boolean isRequestFiltered(T request)
-
clearAllFilters
void clearAllFilters()
-
getRequestTable
java.util.Map<T,java.lang.Integer> getRequestTable()
-
getBanDurationMinutes
int getBanDurationMinutes()
-
setBanDurationMinutes
void setBanDurationMinutes(int banDurationMinutes)
-
getMaxFloodingAttempts
int getMaxFloodingAttempts()
-
setMaxFloodingAttempts
void setMaxFloodingAttempts(int maxFloodingAttempts)
-
getSecondsBeforeBan
int getSecondsBeforeBan()
-
setSecondsBeforeBan
void setSecondsBeforeBan(int secondsBeforeBan)
-
isLogFloodingAttempts
boolean isLogFloodingAttempts()
-
setLogFloodingAttempts
void setLogFloodingAttempts(boolean logFloodingAttempts)
-
getBanMode
BanMode getBanMode()
-
setBanMode
void setBanMode(BanMode banMode)
-
getBanMessage
java.lang.String getBanMessage()
-
setBanMessage
void setBanMessage(java.lang.String banMessage)
-
-