SK.gnome.dwarf.mail.smtp.proc.filter
Class RecipientIsSender

java.lang.Object
  extended bySK.gnome.dwarf.GenericService
      extended bySK.gnome.dwarf.mail.smtp.proc.MailFilter
          extended bySK.gnome.dwarf.mail.smtp.proc.filter.RecipientIsSender
All Implemented Interfaces:
SK.gnome.dwarf.Service

public class RecipientIsSender
extends MailFilter

This filter matches the messages with sender equal to one of its recipients.


Field Summary
 
Fields inherited from class SK.gnome.dwarf.mail.smtp.proc.MailFilter
condition, context
 
Fields inherited from class SK.gnome.dwarf.GenericService
initParameters, parent
 
Fields inherited from interface SK.gnome.dwarf.Service
INITIALIZED, LOG_DEBUG, LOG_ERROR, LOG_FATAL, LOG_INFO, LOG_TRACE, LOG_WARN, LOG_XFER, SHUTDOWN, STARTED, STOPPED
 
Constructor Summary
RecipientIsSender(java.lang.String name)
           
 
Method Summary
protected  java.util.Collection filter(MailAgentMessage message, java.util.Collection recipients)
          Filters the given message.
 
Methods inherited from class SK.gnome.dwarf.mail.smtp.proc.MailFilter
destroy, init, setCondition
 
Methods inherited from class SK.gnome.dwarf.GenericService
getAuthenticator, getAuthFacility, getFullName, getInitParameter, getInitParameterNames, getLogFacility, getLogger, getName, getParameters, getPrincipal, getShutdownTimeout, getState, init, log, log, login, logout, setAuthFacility, setInitParameters, setLogFacility, shutdown, start, stop, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RecipientIsSender

public RecipientIsSender(java.lang.String name)
Method Detail

filter

protected java.util.Collection filter(MailAgentMessage message,
                                      java.util.Collection recipients)
Description copied from class: MailFilter
Filters the given message.

Matches the message and its recipients with the given MailFilter.condition. If the matching process fails, an empty collection is returned. Otherwise, the method returns a collection of recipients which meets the given condition. If the condition is not based on the message recipients, the returned collection will contain all message recipients. If the matching is based on the recipients, the collection will contain only those ones, which actually meets the recipient-based condition.

Method must return a new Collection object each time it is called.

Specified by:
filter in class MailFilter
Parameters:
message - the queued message
recipients - the input collection of recipients
Returns:
the filtered collection of recipients


Copyright (c) 2004-2005, Gnome Ltd. All rights reserved.