package com.mindprod.spam; import javax.mail.internet.MimeMessage; /** * Interface for a spam filter. * * @author Roedy Green * @version 1.0 * @since 2003-09-22 */ public interface SpamDetect { /** * What is the probability the given message is spam? * 0.0 = definitely good. * 0.5 = 50-50 odds * 1.0 = absolutely certainly spam. * -1 = no opinion. * * @param message MimeMessage from which you can extract any fields of interest. * * @return probability */ public float probabilityIsSpam ( MimeMessage message ); /** * Fire up this filter. * Do any one-time initialisation, * e.g. load tables, restore persistent state. */ public void open(); /** * Shutdown this filter, * e.g. save persistent state, free resources. */ public void close(); }