Interface ITheBrig

All Known Implementing Classes:
TheBrig

public interface ITheBrig
Monitors the inmates who have misbehaved in our system.

a client who needs addressing will be stored in a map in this class for as long as required. After they have served their time, they are released.

See also UnderInvestigation

  • Method Summary

    Modifier and Type
    Method
    Description
    Get the current list of ip addresses that have been judged as having carried out attacks on the system.
     
    boolean
    isInJail(String clientIdentifier)
    Return true if a particular client ip address is found in the list.
    boolean
    sendToJail(String clientIdentifier, long sentenceDuration)
    Put a client in jail for some infraction, for a specified time.
    void
    Kills the infinite loop running inside this class.
  • Method Details

    • initialize

      ITheBrig initialize()
    • stop

      void stop()
      Kills the infinite loop running inside this class.
    • sendToJail

      boolean sendToJail(String clientIdentifier, long sentenceDuration)
      Put a client in jail for some infraction, for a specified time.
      Parameters:
      clientIdentifier - the client's address plus some feature identifier, like 1.2.3.4_too_freq_downloads
      sentenceDuration - length of stay, in milliseconds
      Returns:
      whether we put this client in jail
    • isInJail

      boolean isInJail(String clientIdentifier)
      Return true if a particular client ip address is found in the list.
    • getInmates

      List<Inmate> getInmates()
      Get the current list of ip addresses that have been judged as having carried out attacks on the system.