com.goldeninnovations.smp.messagefilter
Class MessageFilterChain
java.lang.Object
com.goldeninnovations.smp.messagefilter.MessageFilterChain
- All Implemented Interfaces:
- MessageFilter
public class MessageFilterChain
- extends Object
- implements MessageFilter
Allows multiple MessageFilter
s to be chained together. All filters
must return true
for a message to be accepted.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MessageFilterChain
public MessageFilterChain()
acceptMessage
public boolean acceptMessage(EmailAddress recipient,
InetAddress senderAddress,
EmailAddress sender)
- Checks with the MessageFilters and returns true only if they all accept the message
- 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.
addMessageFilter
public void addMessageFilter(MessageFilter filter)
- Adds a new MessageFilter to the chain.
- Parameters:
filter
- the messageFilter to add.
Copyright © 2010 Eric Daugherty. All Rights Reserved.