org.starhope.appius.messaging
Class BadMailList
java.lang.Object
org.starhope.appius.sql.SQLPeerList
org.starhope.appius.messaging.BadMailList
- All Implemented Interfaces:
- Iterable, Collection
public class BadMailList
- extends SQLPeerList
- Author:
- brpocock
Method Summary |
void |
add(String mail,
Date until)
Ban an eMail address from being used for a certain amount of
time. |
static BadMailList |
get()
|
boolean |
isBad(String mail)
|
void |
remove(String mail)
Remove an eMail address from the banned list: administrative
function. |
Methods inherited from class org.starhope.appius.sql.SQLPeerList |
add, addAll, clear, clearCache, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, sqlSelectCount, toArray, toArray |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
badMail
private final ConcurrentHashMap<String,Date> badMail
- An index of bad eMail addresses with their expiry dates (for when
to take them off of this list)
BadMailList
public BadMailList()
- Void constructor
get
public static BadMailList get()
- Returns:
- Returns the singleton, global BadMailList.
add
public void add(String mail,
Date until)
- Ban an eMail address from being used for a certain amount of
time. This will also close any User accounts which are associated
with it.
- Parameters:
mail
- The address to banuntil
- The date at which this ban expires
isBad
public boolean isBad(String mail)
- Parameters:
mail
- The eMail address to be tested
- Returns:
- true, if the eMail address is on the bad mail list and
not yet expired from it.
remove
public void remove(String mail)
- Remove an eMail address from the banned list: administrative
function.
- Parameters:
mail
- The eMail address which will once again be allowed.