org.apache.james.domainlist.lib
Class AbstractDomainList

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

public abstract class AbstractDomainList
extends java.lang.Object
implements DomainList, LogEnabled

All implementations of the DomainList interface should extends this abstract class


Constructor Summary
AbstractDomainList()
           
 
Method Summary
 boolean addDomain(java.lang.String domain)
           
protected abstract  boolean addDomainInternal(java.lang.String domain)
          Add domain
protected  DNSService getDNSServer()
          Return dnsServer
protected abstract  java.util.List<java.lang.String> getDomainListInternal()
          Return domainList
 java.lang.String[] getDomains()
           
protected  org.apache.commons.logging.Log getLogger()
           
 boolean removeDomain(java.lang.String domain)
           
protected abstract  boolean removeDomainInternal(java.lang.String domain)
          Remove domain
 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.apache.commons.logging.Log 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
containsDomain
 

Constructor Detail

AbstractDomainList

public AbstractDomainList()
Method Detail

setDNSService

public void setDNSService(DNSService dns)

setLog

public void setLog(org.apache.commons.logging.Log logger)
Specified by:
setLog in interface LogEnabled

getLogger

protected org.apache.commons.logging.Log getLogger()

getDomains

public java.lang.String[] getDomains()
Specified by:
getDomains in interface DomainList

addDomain

public boolean addDomain(java.lang.String domain)
Specified by:
addDomain in interface DomainList
See Also:
ManageableDomainList

removeDomain

public boolean removeDomain(java.lang.String domain)
Specified by:
removeDomain in interface DomainList
See Also:
ManageableDomainList

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 java.util.List<java.lang.String> getDomainListInternal()
Return domainList

Returns:
List

addDomainInternal

protected abstract boolean addDomainInternal(java.lang.String domain)
Add domain

Parameters:
domain - domain to add
Returns:
true if successfully

removeDomainInternal

protected abstract boolean removeDomainInternal(java.lang.String domain)
Remove domain

Parameters:
domain - domain to remove
Returns:
true if successfully


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