talx x1.0.5

talx.model.filters
Class SenderFilterAdapter

java.lang.Object
  extended bytalx.model.filters.SenderFilterAdapter
All Implemented Interfaces:
java.util.EventListener, SenderFilter, SenderFilterListener, TALFeature
Direct Known Subclasses:
NoTextFilter

public abstract class SenderFilterAdapter
extends java.lang.Object
implements SenderFilter

Adapter class for objects in the outgoing filter stack. Individual filters need only implement the filterMessage method to be fully functional.


Field Summary
protected  SenderFilterListener[] listeners
          Holds all the objects listening to events from this class.
 
Constructor Summary
SenderFilterAdapter()
           
 
Method Summary
 void addFilterListener(SenderFilterListener l)
           
 void filterActivated(TALMailEvent ev)
          This method is called when the previous filter dropped a message.
protected abstract  boolean filterMessage(javax.mail.internet.MimeMessage msg)
           
 void fireFilterActivated(TALMailEvent ev)
          This method is called to drop a message.
 void fireSendingMail(TALMailEvent ev)
          This method is called to pass the message to the next filter.
 void release()
          Destroys the listeners list.
 void sendingMail(TALMailEvent ev)
          This method is called when mail is to be sent out from the system.
 java.lang.String toString()
          Returns the classname of this filter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

listeners

protected SenderFilterListener[] listeners
Holds all the objects listening to events from this class.

Constructor Detail

SenderFilterAdapter

public SenderFilterAdapter()
Method Detail

sendingMail

public void sendingMail(TALMailEvent ev)
This method is called when mail is to be sent out from the system. It calls filterMessage to decide whether to pass the message event through the sendingMail pipeline or shunt it to the filterActivated pipe.

Specified by:
sendingMail in interface SenderFilterListener

filterActivated

public void filterActivated(TALMailEvent ev)
This method is called when the previous filter dropped a message. This filter simply passes the filterActivated event on to its listeners.

Specified by:
filterActivated in interface SenderFilterListener

addFilterListener

public void addFilterListener(SenderFilterListener l)
Specified by:
addFilterListener in interface SenderFilter

fireSendingMail

public void fireSendingMail(TALMailEvent ev)
This method is called to pass the message to the next filter.


fireFilterActivated

public void fireFilterActivated(TALMailEvent ev)
This method is called to drop a message.


filterMessage

protected abstract boolean filterMessage(javax.mail.internet.MimeMessage msg)

release

public void release()
Destroys the listeners list. Subclasses that override this method to do their own clean-up must also call super.release().

Specified by:
release in interface TALFeature

toString

public java.lang.String toString()
Returns the classname of this filter.


talx x1.0.5

© 2001-2005 University of Oregon.
Eugene OR 97403, U.S.A. All Rights Reserved.