org.apache.james.util
Class POP3BeforeSMTPHelper

java.lang.Object
  extended by org.apache.james.util.POP3BeforeSMTPHelper

public class POP3BeforeSMTPHelper
extends java.lang.Object

Helper class which is used to store ipAddresses and timestamps for pop before smtp support.


Field Summary
static long EXPIRE_TIME
          Default expire time in ms (1 hour)
static java.util.Map ipMap
          The map in which the ipAddresses and timestamp stored
 
Method Summary
static void addIPAddress(java.lang.String ipAddress)
          Add the ipAddress to the authorized ipAddresses
static void clearIP()
          Remove all ipAddresses from the authorized map
static boolean isAuthorized(java.lang.String ipAddress)
          Return true if the ip is authorized to relay
static void removeExpiredIP()
           
static void removeExpiredIP(long clearTime)
          Remove all ipAddress from the authorized map which are older then the given time
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ipMap

public static java.util.Map ipMap
The map in which the ipAddresses and timestamp stored


EXPIRE_TIME

public static final long EXPIRE_TIME
Default expire time in ms (1 hour)

See Also:
Constant Field Values
Method Detail

isAuthorized

public static boolean isAuthorized(java.lang.String ipAddress)
Return true if the ip is authorized to relay

Parameters:
ipAddress - The ipAddress
Returns:
true if authorized. Else false

addIPAddress

public static void addIPAddress(java.lang.String ipAddress)
Add the ipAddress to the authorized ipAddresses

Parameters:
ipAddress - The ipAddress

removeExpiredIP

public static void removeExpiredIP()
See Also:
removeExpiredIP(long)

removeExpiredIP

public static void removeExpiredIP(long clearTime)
Remove all ipAddress from the authorized map which are older then the given time

Parameters:
clearTime - The time in milliseconds after which an ipAddress should be handled as expired

clearIP

public static void clearIP()
Remove all ipAddresses from the authorized map



Copyright ? 2002-2009 The Apache Software Foundation. All Rights Reserved.