Class AbstractRateLimiter<ClientIdType>
- java.lang.Object
-
- com.floragunn.searchguard.auth.limiting.AbstractRateLimiter<ClientIdType>
-
- All Implemented Interfaces:
AuthFailureListener,ClientBlockRegistry<ClientIdType>
- Direct Known Subclasses:
AddressBasedRateLimiter,UserNameBasedRateLimiter
public abstract class AbstractRateLimiter<ClientIdType> extends Object implements AuthFailureListener, ClientBlockRegistry<ClientIdType>
-
-
Field Summary
Fields Modifier and Type Field Description protected ClientBlockRegistry<ClientIdType>clientBlockRegistryprotected RateTracker<ClientIdType>rateTracker
-
Constructor Summary
Constructors Constructor Description AbstractRateLimiter(org.elasticsearch.common.settings.Settings settings, Path configPath, Class<ClientIdType> clientIdType)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidblock(ClientIdType clientId)Class<ClientIdType>getClientIdType()booleanisBlocked(ClientIdType clientId)abstract voidonAuthFailure(InetAddress remoteAddress, AuthCredentials authCredentials, Object request)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.floragunn.searchguard.auth.AuthFailureListener
getType
-
-
-
-
Field Detail
-
clientBlockRegistry
protected final ClientBlockRegistry<ClientIdType> clientBlockRegistry
-
rateTracker
protected final RateTracker<ClientIdType> rateTracker
-
-
Constructor Detail
-
AbstractRateLimiter
public AbstractRateLimiter(org.elasticsearch.common.settings.Settings settings, Path configPath, Class<ClientIdType> clientIdType)
-
-
Method Detail
-
onAuthFailure
public abstract void onAuthFailure(InetAddress remoteAddress, AuthCredentials authCredentials, Object request)
- Specified by:
onAuthFailurein interfaceAuthFailureListener
-
isBlocked
public boolean isBlocked(ClientIdType clientId)
- Specified by:
isBlockedin interfaceClientBlockRegistry<ClientIdType>
-
block
public void block(ClientIdType clientId)
- Specified by:
blockin interfaceClientBlockRegistry<ClientIdType>
-
getClientIdType
public Class<ClientIdType> getClientIdType()
- Specified by:
getClientIdTypein interfaceClientBlockRegistry<ClientIdType>
-
-