|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.james.jspf.core.SPFSession
public class SPFSession
This Class is used as a container between the other classes. All necessary values get stored here and get retrieved from here.
Field Summary | |
---|---|
static int |
MAX_DEPTH
The maximum mechanismn which are allowed to use |
Constructor Summary | |
---|---|
SPFSession(java.lang.String mailFrom,
java.lang.String heloDomain,
java.lang.String clientIP)
Build the SPFSession from the given parameters |
Method Summary | |
---|---|
java.lang.Object |
getAttribute(java.lang.String key)
Retrieve a stored attribute |
java.lang.String |
getClientDomain()
Get clientDomain (p) |
java.lang.String |
getCurrentDomain()
Get current-domain (d) |
java.lang.String |
getCurrentResult()
Get the current result |
java.lang.String |
getCurrentResultExpanded()
|
java.lang.String |
getCurrentSenderPart()
Get current-senderpart (l) |
java.lang.String |
getExplanation()
Get the explanation |
java.lang.String |
getHostName()
Get sender-domain (h) |
java.lang.String |
getInAddress()
Get inAddress (v) |
java.lang.String |
getIpAddress()
Get the ipAddress which was used to connect |
java.lang.String |
getMacroIpAddress()
Get sending-host (i) |
java.lang.String |
getMailFrom()
Get responsible-sender (s) |
java.lang.String |
getReadableIP()
Get readableIP (c) |
java.lang.String |
getReceivingDomain()
Get receivingDomain (r) |
java.lang.String |
getSenderDomain()
Get senderDomain (o) |
long |
getTimeStamp()
Get timeStamp (t) |
boolean |
ignoreExplanation()
Return true if the explanation should be ignored |
void |
increaseCurrentDepth()
Increase the current depth: if we reach maximum calls we must throw a PermErrorException. |
SPFChecker |
popChecker()
Remove the SPFChecker on the top and return it. |
void |
pushChecker(SPFChecker checker)
Add the given SPFChecker on top of the stack |
java.lang.Object |
removeAttribute(java.lang.String key)
Remove the attribute stored under the given key |
void |
setAttribute(java.lang.String key,
java.lang.Object value)
Sets a new attribute in the session |
void |
setClientDomain(java.lang.String clientDomain)
Sets the calculated clientDomain |
void |
setCurrentDomain(java.lang.String domain)
Set the currentDomain |
void |
setCurrentResult(java.lang.String result)
Set the current result |
void |
setCurrentResultExpanded(java.lang.String result)
|
void |
setExplanation(java.lang.String explanation)
Set the explanation which will returned when a fail match |
void |
setIgnoreExplanation(boolean ignoreExplanation)
Get set to true if the explanation should be ignored |
void |
setReceivingDomain(java.lang.String receivingDomain)
Sets the new receiving domain |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int MAX_DEPTH
Constructor Detail |
---|
public SPFSession(java.lang.String mailFrom, java.lang.String heloDomain, java.lang.String clientIP)
mailFrom
- The emailaddress of the senderheloDomain
- The helo provided by the senderclientIP
- The ipaddress of the clientMethod Detail |
---|
public java.lang.String getCurrentSenderPart()
MacroData
getCurrentSenderPart
in interface MacroData
MacroData.getCurrentSenderPart()
public java.lang.String getMailFrom()
MacroData
getMailFrom
in interface MacroData
MacroData.getMailFrom()
public java.lang.String getHostName()
MacroData
getHostName
in interface MacroData
MacroData.getHostName()
public java.lang.String getCurrentDomain()
MacroData
getCurrentDomain
in interface MacroData
MacroData.getCurrentDomain()
public java.lang.String getInAddress()
MacroData
getInAddress
in interface MacroData
MacroData.getInAddress()
public java.lang.String getClientDomain()
MacroData
getClientDomain
in interface MacroData
MacroData.getClientDomain()
public void setClientDomain(java.lang.String clientDomain)
clientDomain
- the new clientDomainpublic java.lang.String getSenderDomain()
MacroData
getSenderDomain
in interface MacroData
MacroData.getSenderDomain()
public java.lang.String getIpAddress()
public java.lang.String getMacroIpAddress()
MacroData
getMacroIpAddress
in interface MacroData
MacroData.getMacroIpAddress()
public long getTimeStamp()
MacroData
getTimeStamp
in interface MacroData
MacroData.getTimeStamp()
public java.lang.String getReadableIP()
MacroData
getReadableIP
in interface MacroData
MacroData.getReadableIP()
public java.lang.String getReceivingDomain()
MacroData
getReceivingDomain
in interface MacroData
MacroData.getReceivingDomain()
public void setReceivingDomain(java.lang.String receivingDomain)
receivingDomain
- the new receiving domainpublic void increaseCurrentDepth() throws PermErrorException
PermErrorException
public void setCurrentDomain(java.lang.String domain)
domain
- The current used domainpublic void setExplanation(java.lang.String explanation)
explanation
- This String is set as explanationpublic java.lang.String getExplanation()
public void setCurrentResult(java.lang.String result)
result
- resultpublic java.lang.String getCurrentResult()
public void setIgnoreExplanation(boolean ignoreExplanation)
ignoreExplanation
- true or falsepublic boolean ignoreExplanation()
public java.lang.Object getAttribute(java.lang.String key)
key
- the attribute key
public void setAttribute(java.lang.String key, java.lang.Object value)
key
- attribute keyvalue
- the value for this attributepublic java.lang.Object removeAttribute(java.lang.String key)
key
- the key of the attribute
public void pushChecker(SPFChecker checker)
checker
- public SPFChecker popChecker()
public void setCurrentResultExpanded(java.lang.String result)
result
- public java.lang.String getCurrentResultExpanded()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |