com.goldeninnovations.smp.messagefilter
Class DefaultMessageFilter

java.lang.Object
  extended by com.goldeninnovations.smp.messagefilter.DefaultMessageFilter
All Implemented Interfaces:
MessageFilter
Direct Known Subclasses:
DomainMessageFilter

public class DefaultMessageFilter
extends Object
implements MessageFilter

A simple implementation of the MessageProcessor interface that accepts messages for all valid email addresses.


Constructor Summary
DefaultMessageFilter()
           
 
Method Summary
 boolean acceptMessage(EmailAddress recipient, InetAddress senderAddress, EmailAddress sender)
          Returns true for all legal email addresses.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultMessageFilter

public DefaultMessageFilter()
Method Detail

acceptMessage

public boolean acceptMessage(EmailAddress recipient,
                             InetAddress senderAddress,
                             EmailAddress sender)
Returns true for all legal email addresses.

Specified by:
acceptMessage in interface MessageFilter
Parameters:
recipient - the recipient to test. The email address specified in the RCPT TO command.
senderAddress - the Internet Address of the SMTP client.
sender - The email address specified in the MAIL FROM command.
Returns:
true if the message should be accepted, false otherwise.


Copyright © 2010 Eric Daugherty. All Rights Reserved.