Package com.smartfoxserver.util
Class SFSFloodFilter
java.lang.Object
com.smartfoxserver.core.service.BaseCoreService
com.smartfoxserver.util.SFSFloodFilter
- All Implemented Interfaces:
com.smartfoxserver.bitswarm.service.IService,com.smartfoxserver.core.ICoreService,IFloodFilter<SystemRequest>
public class SFSFloodFilter
extends com.smartfoxserver.core.service.BaseCoreService
implements IFloodFilter<SystemRequest>
-
Field Summary
Fields inherited from class com.smartfoxserver.core.service.BaseCoreService
active, name -
Constructor Summary
ConstructorsConstructorDescriptionSFSFloodFilter(com.smartfoxserver.entities.managers.IBannedUserManager manager) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddRequestFilter(SystemRequest request, int reqPerSecond) voidvoidfilterRequest(SystemRequest reqType, User user) intintintvoidbooleanbooleanisRequestFiltered(SystemRequest request) voidsetActive(boolean flag) voidsetBanDurationMinutes(int banDurationMinutes) voidsetBanMessage(String banMessage) voidsetBanMode(BanMode banMode) voidsetLogFloodingAttempts(boolean logFloodingAttempts) voidsetMaxFloodingAttempts(int maxFloodingAttempts) voidsetSecondsBeforeBan(int secondsBeforeBan) Methods inherited from class com.smartfoxserver.core.service.BaseCoreService
destroy, getId, getName, handleMessage, isActive, setName, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.smartfoxserver.core.ICoreService
isActiveMethods inherited from interface com.smartfoxserver.bitswarm.service.IService
destroy, getName, handleMessage, setName
-
Constructor Details
-
SFSFloodFilter
public SFSFloodFilter(com.smartfoxserver.entities.managers.IBannedUserManager manager)
-
-
Method Details
-
init
- Specified by:
initin interfacecom.smartfoxserver.bitswarm.service.IService- Overrides:
initin classcom.smartfoxserver.core.service.BaseCoreService
-
filterRequest
- Specified by:
filterRequestin interfaceIFloodFilter<SystemRequest>- Throws:
SFSFloodingException
-
setActive
public void setActive(boolean flag) - Specified by:
setActivein interfaceIFloodFilter<SystemRequest>
-
addRequestFilter
- Specified by:
addRequestFilterin interfaceIFloodFilter<SystemRequest>
-
getRequestTable
- Specified by:
getRequestTablein interfaceIFloodFilter<SystemRequest>
-
clearAllFilters
public void clearAllFilters()- Specified by:
clearAllFiltersin interfaceIFloodFilter<SystemRequest>
-
isRequestFiltered
- Specified by:
isRequestFilteredin interfaceIFloodFilter<SystemRequest>
-
getBanDurationMinutes
public int getBanDurationMinutes()- Specified by:
getBanDurationMinutesin interfaceIFloodFilter<SystemRequest>
-
setBanDurationMinutes
public void setBanDurationMinutes(int banDurationMinutes) - Specified by:
setBanDurationMinutesin interfaceIFloodFilter<SystemRequest>
-
getMaxFloodingAttempts
public int getMaxFloodingAttempts()- Specified by:
getMaxFloodingAttemptsin interfaceIFloodFilter<SystemRequest>
-
setMaxFloodingAttempts
public void setMaxFloodingAttempts(int maxFloodingAttempts) - Specified by:
setMaxFloodingAttemptsin interfaceIFloodFilter<SystemRequest>
-
getSecondsBeforeBan
public int getSecondsBeforeBan()- Specified by:
getSecondsBeforeBanin interfaceIFloodFilter<SystemRequest>
-
setSecondsBeforeBan
public void setSecondsBeforeBan(int secondsBeforeBan) - Specified by:
setSecondsBeforeBanin interfaceIFloodFilter<SystemRequest>
-
isLogFloodingAttempts
public boolean isLogFloodingAttempts()- Specified by:
isLogFloodingAttemptsin interfaceIFloodFilter<SystemRequest>
-
setLogFloodingAttempts
public void setLogFloodingAttempts(boolean logFloodingAttempts) - Specified by:
setLogFloodingAttemptsin interfaceIFloodFilter<SystemRequest>
-
getBanMode
- Specified by:
getBanModein interfaceIFloodFilter<SystemRequest>
-
setBanMode
- Specified by:
setBanModein interfaceIFloodFilter<SystemRequest>
-
getBanMessage
- Specified by:
getBanMessagein interfaceIFloodFilter<SystemRequest>
-
setBanMessage
- Specified by:
setBanMessagein interfaceIFloodFilter<SystemRequest>
-