spamarchive
Class Domain

java.lang.Object
  extended by spamarchive.Domain

public class Domain
extends java.lang.Object

Used to store information about the domain found in the earliest Received header of the messages being parsed.


Constructor Summary
Domain(java.lang.String str, int spf, int cnt)
          Creates a new instance of Domain and initializes the member variables to the arguments received.
 
Method Summary
 void assignSPFExists(int value)
          Sets the value of spfExists to value argument.
 int getCount()
          Returns the value of count.
 java.lang.String getDomain()
          Returns the name of this domain.
 int getSPFExists()
          Returns the value of spfExists.
 void increaseCount()
          Increments value of count by 1.
 void setDomain(java.lang.String str)
          Sets the value of domain to the str argument.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Domain

public Domain(java.lang.String str,
              int spf,
              int cnt)
Creates a new instance of Domain and initializes the member variables to the arguments received.

Parameters:
str - the name of the domain
spf - whether or not there exists a SPF record in the domain's DNS entry.
cnt - number of messages having this domain in their earliest Received header.
Method Detail

setDomain

public void setDomain(java.lang.String str)
Sets the value of domain to the str argument.

Parameters:
str - the name that has to be assigned to this domain.

assignSPFExists

public void assignSPFExists(int value)
Sets the value of spfExists to value argument.

Parameters:
value - the value to be assigned to spfExists.

increaseCount

public void increaseCount()
Increments value of count by 1.


getDomain

public java.lang.String getDomain()
Returns the name of this domain.

Returns:
the name of this domain.

getSPFExists

public int getSPFExists()
Returns the value of spfExists.

Returns:
-3 to -6 if SPF existence test failed;
0 if the domain doesn't have a SPF record in its DNS entry;
1 if the domain has a SPF record in its DNS entry.

getCount

public int getCount()
Returns the value of count.

Returns:
the number of messages having this domain in their earliest Received header.