games.strategy.engine.lobby.server.userDB
Class BannedIpController

java.lang.Object
  extended by games.strategy.engine.lobby.server.userDB.BannedIpController

public class BannedIpController
extends java.lang.Object

Utilitiy class to create/read/delete banned ips (there is no update).

Author:
sgb

Constructor Summary
BannedIpController()
           
 
Method Summary
 void addBannedIp(java.lang.String ip)
          Ban the ip permanently
 void addBannedIp(java.lang.String ip, java.util.Date banTill)
          Ban the given ip.
 boolean isIpBanned(java.lang.String ip)
          Is the given ip banned?
 void removeBannedIp(java.lang.String ip)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BannedIpController

public BannedIpController()
Method Detail

addBannedIp

public void addBannedIp(java.lang.String ip)
Ban the ip permanently


addBannedIp

public void addBannedIp(java.lang.String ip,
                        java.util.Date banTill)
Ban the given ip. If banTill is not null, the ban will expire when banTill is reached.

If this ip is already banned, this call will update the ban_end.


removeBannedIp

public void removeBannedIp(java.lang.String ip)

isIpBanned

public boolean isIpBanned(java.lang.String ip)
Is the given ip banned? This may have the side effect of removing from the database any ip's whose ban has expired