java.lang.Object
com.renomad.minum.security.TheBrig
- All Implemented Interfaces:
ITheBrig
See
ITheBrig-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the current list of ip addresses that have been judged as having carried out attacks on the system.booleanReturn true if a particular client ip address is found in the list.booleansendToJail(String clientIdentifier, long sentenceDuration) Put a client in jail for some infraction, for a specified time.voidstop()Kills the infinite loop running inside this class.
-
Constructor Details
-
TheBrig
-
TheBrig
In this class we create a thread that runs throughout the lifetime of the application, in an infinite loop removing keys from the list under consideration.
-
-
Method Details
-
initialize
- Specified by:
initializein interfaceITheBrig
-
stop
public void stop()Description copied from interface:ITheBrigKills the infinite loop running inside this class. -
sendToJail
Description copied from interface:ITheBrigPut a client in jail for some infraction, for a specified time.- Specified by:
sendToJailin interfaceITheBrig- Parameters:
clientIdentifier- the client's address plus some feature identifier, like 1.2.3.4_too_freq_downloadssentenceDuration- length of stay, in milliseconds- Returns:
- whether we put this client in jail
-
isInJail
Description copied from interface:ITheBrigReturn true if a particular client ip address is found in the list. -
getInmates
Description copied from interface:ITheBrigGet the current list of ip addresses that have been judged as having carried out attacks on the system.- Specified by:
getInmatesin interfaceITheBrig
-