org.apache.james.domainlist.lib
Class AbstractDomainList

java.lang.Object
  extended by org.apache.james.domainlist.lib.AbstractDomainList
All Implemented Interfaces:
DomainList, Configurable, LogEnabled

public abstract class AbstractDomainList
extends Object
implements DomainList, LogEnabled, Configurable

All implementations of the DomainList interface should extends this abstract class


Constructor Summary
AbstractDomainList()
           
 
Method Summary
 void configure(org.apache.commons.configuration.HierarchicalConfiguration config)
           
 String getDefaultDomain()
           
protected  DNSService getDNSServer()
          Return dnsServer
protected abstract  List<String> getDomainListInternal()
          Return domainList
 String[] getDomains()
           
protected  org.slf4j.Logger getLogger()
           
 void setAutoDetect(boolean autoDetect)
          Set to true to autodetect the hostname of the host on which james is running, and add this to the domain service Default is true
 void setAutoDetectIP(boolean autoDetectIP)
          Set to true to lookup the ipaddresses for each given domain and add these to the domain service Default is true
 void setDNSService(DNSService dns)
           
 void setLog(org.slf4j.Logger logger)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.james.domainlist.api.DomainList
addDomain, containsDomain, removeDomain
 

Constructor Detail

AbstractDomainList

public AbstractDomainList()
Method Detail

setDNSService

public void setDNSService(DNSService dns)

setLog

public void setLog(org.slf4j.Logger logger)
Specified by:
setLog in interface LogEnabled

getLogger

protected org.slf4j.Logger getLogger()

configure

public void configure(org.apache.commons.configuration.HierarchicalConfiguration config)
               throws org.apache.commons.configuration.ConfigurationException
Specified by:
configure in interface Configurable
Throws:
org.apache.commons.configuration.ConfigurationException
See Also:
Configurable.configure(HierarchicalConfiguration)

getDefaultDomain

public String getDefaultDomain()
                        throws DomainListException
Specified by:
getDefaultDomain in interface DomainList
Throws:
DomainListException
See Also:
DomainList.getDefaultDomain()

getDomains

public String[] getDomains()
                    throws DomainListException
Specified by:
getDomains in interface DomainList
Throws:
DomainListException
See Also:
DomainList.getDomains()

setAutoDetect

public void setAutoDetect(boolean autoDetect)
Set to true to autodetect the hostname of the host on which james is running, and add this to the domain service Default is true

Parameters:
autoDetect - set to false for disable

setAutoDetectIP

public void setAutoDetectIP(boolean autoDetectIP)
Set to true to lookup the ipaddresses for each given domain and add these to the domain service Default is true

Parameters:
autoDetectIP - set to false for disable

getDNSServer

protected DNSService getDNSServer()
Return dnsServer

Returns:
dns

getDomainListInternal

protected abstract List<String> getDomainListInternal()
                                               throws DomainListException
Return domainList

Returns:
List
Throws:
DomainListException


Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.