org.apache.james.jspf.terms
Class Directive

java.lang.Object
  extended by org.apache.james.jspf.terms.Directive
All Implemented Interfaces:
SPFChecker

public class Directive
extends java.lang.Object
implements SPFChecker

A Directive is a mechanism with a resulting qualifier.


Field Summary
static java.lang.String ATTRIBUTE_MECHANISM_RESULT
           
protected  java.lang.String qualifier
           
 
Constructor Summary
Directive(java.lang.String qualifier, Mechanism mechanism, Logger logger)
          Construct Directive
 
Method Summary
 DNSLookupContinuation checkSPF(SPFSession spfSession)
          Run the Directive
 Mechanism getMechanism()
          Return the Mechanism which should be run
 java.lang.String getQualifier()
          Return the Qualifier
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ATTRIBUTE_MECHANISM_RESULT

public static final java.lang.String ATTRIBUTE_MECHANISM_RESULT
See Also:
Constant Field Values

qualifier

protected java.lang.String qualifier
Constructor Detail

Directive

public Directive(java.lang.String qualifier,
                 Mechanism mechanism,
                 Logger logger)
          throws PermErrorException
Construct Directive

Parameters:
qualifier - The qualifier to use. Valid qualifier are: +, -, ~, ?
mechanism - The Mechanism
Throws:
PermErrorException - Get thrown if a PermError should returned
Method Detail

checkSPF

public DNSLookupContinuation checkSPF(SPFSession spfSession)
                               throws PermErrorException,
                                      TempErrorException,
                                      NoneException,
                                      NeutralException
Run the Directive

Specified by:
checkSPF in interface SPFChecker
Parameters:
spfSession - The SPFSession to use
Returns:
The qualifier which was returned
Throws:
PermErrorException - get thrown if a PermError should returned
TempErrorException - get thrown if a TempError should returned
NoneException - get thrown if a NoneException should returned;
NeutralException

getMechanism

public Mechanism getMechanism()
Return the Mechanism which should be run

Returns:
the Mechanism

getQualifier

public java.lang.String getQualifier()
Return the Qualifier

Returns:
the qualifier

toString

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


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