org.apache.james.jspf.terms
Class IncludeMechanism

java.lang.Object
  extended by org.apache.james.jspf.terms.IncludeMechanism
All Implemented Interfaces:
LogEnabled, MacroExpandEnabled, SPFCheckEnabled, SPFChecker, ConfigurationEnabled, Mechanism

public class IncludeMechanism
extends java.lang.Object
implements Mechanism, ConfigurationEnabled, LogEnabled, SPFCheckEnabled, MacroExpandEnabled

This class represent the incude mechanism


Field Summary
protected  java.lang.String host
           
protected  Logger log
           
static java.lang.String REGEX
          ABNF: include = "include" ":" domain-spec
 
Constructor Summary
IncludeMechanism()
           
 
Method Summary
 DNSLookupContinuation checkSPF(SPFSession spfData)
          Run check for SPF with the given values.
 void config(Configuration params)
          Configuration
 void enableLogging(Logger logger)
          Provide component with a logger.
 void enableMacroExpand(MacroExpand macroExpand)
          Provide component with a DNSService.
 void enableSPFChecking(SPFChecker checker)
          Provide component with an SPF Checker.
protected  java.lang.String getHost()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

REGEX

public static final java.lang.String REGEX
ABNF: include = "include" ":" domain-spec

See Also:
Constant Field Values

host

protected java.lang.String host

log

protected Logger log
Constructor Detail

IncludeMechanism

public IncludeMechanism()
Method Detail

checkSPF

public DNSLookupContinuation checkSPF(SPFSession spfData)
                               throws PermErrorException,
                                      TempErrorException,
                                      NoneException,
                                      NeutralException
Description copied from interface: SPFChecker
Run check for SPF with the given values.

Specified by:
checkSPF in interface SPFChecker
Parameters:
spfData - The SPF1Data which should be used to run the check
Throws:
PermErrorException - Get thrown if an error was detected
TempErrorException - Get thrown if a DNS problem was detected
NoneException - Get thrown if no Record was found
NeutralException - Get thrown if the result should be neutral
See Also:
SPFChecker.checkSPF(org.apache.james.jspf.core.SPFSession)

config

public void config(Configuration params)
            throws PermErrorException
Description copied from interface: ConfigurationEnabled
Configuration

Specified by:
config in interface ConfigurationEnabled
Parameters:
params - the ConfigurationMatch which should used
Throws:
PermErrorException - get thrown if a PermError should returned
See Also:
ConfigurationEnabled.config(Configuration)

getHost

protected java.lang.String getHost()
Returns:
Returns the host.

enableLogging

public void enableLogging(Logger logger)
Description copied from interface: LogEnabled
Provide component with a logger.

Specified by:
enableLogging in interface LogEnabled
Parameters:
logger - the logger. Must not be null.
See Also:
LogEnabled.enableLogging(org.apache.james.jspf.core.Logger)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
See Also:
Object.toString()

enableSPFChecking

public void enableSPFChecking(SPFChecker checker)
Description copied from interface: SPFCheckEnabled
Provide component with an SPF Checker.

Specified by:
enableSPFChecking in interface SPFCheckEnabled
Parameters:
checker - the checker. Must not be null.
See Also:
SPFCheckEnabled.enableSPFChecking(org.apache.james.jspf.core.SPFChecker)

enableMacroExpand

public void enableMacroExpand(MacroExpand macroExpand)
Description copied from interface: MacroExpandEnabled
Provide component with a DNSService.

Specified by:
enableMacroExpand in interface MacroExpandEnabled
Parameters:
macroExpand - the macroExpand service. Must not be null.
See Also:
MacroExpandEnabled.enableMacroExpand(org.apache.james.jspf.core.MacroExpand)


Copyright © 2006-2009 The Apache Software Foundation. All Rights Reserved.