org.jasen.interfaces
Interface JasenPlugin

All Known Implementing Classes:
AnomalousCharacterScanner, AttachmentScanner, FromAddressValidationScanner, HeuristicScanner, HTMLConcealmentScanner, ImageDominanceScanner, InvisiMailScanner, KeywordScanner, ObfuscatedCharacterScanner, RBLScanner, RecipientScanner, RobinsonScanner, SenderAddressValidationScanner, SenderServerValidationScanner, TagFalseAnchorScanner, TagSourceCgiScanner, TagSourcePortScanner, URLScanner

public interface JasenPlugin

Represents a plugin component to the jASEN engine.

Plugins provide all the actual scanning services offered by the engine

Implemented plugins MUST be thread safe. Multiple threads may be using the engine concurrently, thus plugins MUST NOT maintain state internally.

Author:
Jason Polites

Method Summary
 void destroy()
          Destroys the plugin.
 void init(Properties properties)
          Initialises the plugin with the given properties
 JasenTestResult test(Jasen engine, javax.mail.internet.MimeMessage rawMessage, JasenMessage parsedMessage, ParserData data, ReceivedHeaderParser parser)
          Computess the "spamminess" of a message.
 

Method Detail

init

public void init(Properties properties)
          throws JasenException
Initialises the plugin with the given properties

Parameters:
properties -
Throws:
JasenException

destroy

public void destroy()
             throws JasenException
Destroys the plugin. This is called when the core jASEN engine is destroyed

Throws:
JasenException

test

public JasenTestResult test(Jasen engine,
                            javax.mail.internet.MimeMessage rawMessage,
                            JasenMessage parsedMessage,
                            ParserData data,
                            ReceivedHeaderParser parser)
                     throws JasenException
Computess the "spamminess" of a message.

Parameters:
engine - A reference to the current engine instance.
rawMessage - The original MimeMessage passed to the engine.
parsedMessage - The parsed JasenMessage returned from the MimeParser.
data - The data returned from the HTML Parser / Tokenizer combination.
parser - The parser used to parse mail headers
Returns:
A JasenTestResult
Throws:
JasenException - If an error occurs while performing the test