org.apache.james.smtpserver.junkscore
Interface JunkScore

All Known Implementing Classes:
ComposedJunkScore, JunkScoreImpl

public interface JunkScore


Field Summary
static java.lang.String JUNK_SCORE
          The key for the JunkScore Object which holds scores per mail
static java.lang.String JUNK_SCORE_ATTR
           
static java.lang.String JUNK_SCORE_COMPOSED_ATTR
           
static java.lang.String JUNK_SCORE_SESSION
          The key for the JunkScore Object which holds scores per SMTPSession
static java.lang.String JUNK_SCORE_SESSION_ATTR
           
 
Method Summary
 double getCompleteStoredScores()
          Return the summary of stored scores
 double getStoredScore(java.lang.String key)
          Return the score for the given key.
 java.util.Map getStoredScores()
          Return a copy of the Map which contains the keys with the correspending scores
 double resetStoredScores()
          Reset the all stored scores in the map.
 double setStoredScore(java.lang.String key, double score)
          Set the score for the given key.
 

Field Detail

JUNK_SCORE_SESSION

static final java.lang.String JUNK_SCORE_SESSION
The key for the JunkScore Object which holds scores per SMTPSession

See Also:
Constant Field Values

JUNK_SCORE

static final java.lang.String JUNK_SCORE
The key for the JunkScore Object which holds scores per mail

See Also:
Constant Field Values

JUNK_SCORE_SESSION_ATTR

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

JUNK_SCORE_ATTR

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

JUNK_SCORE_COMPOSED_ATTR

static final java.lang.String JUNK_SCORE_COMPOSED_ATTR
See Also:
Constant Field Values
Method Detail

getCompleteStoredScores

double getCompleteStoredScores()
Return the summary of stored scores

Returns:
score the summary of all stored scores

getStoredScores

java.util.Map getStoredScores()
Return a copy of the Map which contains the keys with the correspending scores

Returns:
scoreMape the map which holds all keys and scores

getStoredScore

double getStoredScore(java.lang.String key)
Return the score for the given key. Returns 0 if no score with the given key exist

Parameters:
key - the key to get the score for
Returns:
score the score

setStoredScore

double setStoredScore(java.lang.String key,
                      double score)
Set the score for the given key. Return the previous stored score for the key.

Parameters:
key - the key under which the score should be stored
score - the store to score
Returns:
oldScore the previous scored stored under the given key

resetStoredScores

double resetStoredScores()
Reset the all stored scores in the map. Return the summary of the previous stored scores.

Returns:
oldScore the summary of the old score;


Copyright ? 2002-2009 The Apache Software Foundation. All Rights Reserved.