org.apache.james.smtpserver.urirbl
Class TLDLookup

java.lang.Object
  extended by org.apache.james.smtpserver.urirbl.TLDLookup

public class TLDLookup
extends java.lang.Object

A utility class that caches sets of multi-part top level domains (TLDs) for quick lookup.


Constructor Summary
TLDLookup()
           
 
Method Summary
static boolean isThreePartTLD(java.lang.String domain)
          Determines if a three-part domain string (xxx.xxx.xxx) is contained in the cache of known three-part TLDs.
static boolean isTwoPartTLD(java.lang.String domain)
          Determines if a two-part domain string (xxx.xxx) is contained in the cache of known two-part TLDs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TLDLookup

public TLDLookup()
Method Detail

isTwoPartTLD

public static boolean isTwoPartTLD(java.lang.String domain)
Determines if a two-part domain string (xxx.xxx) is contained in the cache of known two-part TLDs.

Parameters:
domain - a String representing a two-part domain
Returns:
true if the domain string is found in the cache, false otherwise

isThreePartTLD

public static boolean isThreePartTLD(java.lang.String domain)
Determines if a three-part domain string (xxx.xxx.xxx) is contained in the cache of known three-part TLDs.

Parameters:
domain - a String representing a three-part domain
Returns:
true if the domain string is found in the cache, false otherwise


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