talx x1.0.5

talx.model.filters
Class RemoteReceiver

java.lang.Object
  extended bytalx.model.filters.ReceiverFilterAdapter
      extended bytalx.model.filters.RemoteReceiver
All Implemented Interfaces:
DelayedFeature, java.util.EventListener, ReceiverFilter, ReceiverFilterListener, TALFeature

public class RemoteReceiver
extends ReceiverFilterAdapter
implements DelayedFeature

Gets messages from an IMAP or POP3 store and passes them into the incoming filter stack.


Field Summary
static java.lang.String DELAY
          The key string for the mail check delay parameter.
static java.lang.String HOST
          The key string for the host name parameter.
static java.lang.String PASSWORD
          The key string for the user's password parameter.
static java.lang.String SERVICE
          The key string for the service type parameter.
static java.lang.String USERNAME
          The key string for the username parameter.
 
Constructor Summary
RemoteReceiver(Settings settings, java.lang.String param)
          Constructs new IMAP/POP3 receiver.
 
Method Summary
protected  boolean filterMessage(javax.mail.internet.MimeMessage msg)
          This method is called by NewMailArrived and OldMailArrived to decide whether to pass the message along.
 void initialize()
          Called to initialize the feature.
 void release()
          Releases all system resources held by this object.
 java.lang.String toString()
          Returns the classname of this filter.
 
Methods inherited from class talx.model.filters.ReceiverFilterAdapter
addFilterListener, filterActivated, fireFilterActivated, fireNewMailEvent, newMailArrived
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SERVICE

public static final java.lang.String SERVICE
The key string for the service type parameter.

See Also:
Constant Field Values

HOST

public static final java.lang.String HOST
The key string for the host name parameter.

See Also:
Constant Field Values

USERNAME

public static final java.lang.String USERNAME
The key string for the username parameter.

See Also:
Constant Field Values

PASSWORD

public static final java.lang.String PASSWORD
The key string for the user's password parameter.

See Also:
Constant Field Values

DELAY

public static final java.lang.String DELAY
The key string for the mail check delay parameter.

See Also:
Constant Field Values
Constructor Detail

RemoteReceiver

public RemoteReceiver(Settings settings,
                      java.lang.String param)
Constructs new IMAP/POP3 receiver. The parameter string consist of the following space-delimited name=value pairs:
namevalue
serviceEither "imap" or "pop3"
hostThe computer hosting the service.
userThe username for the account.
passwordThe password for the account
delayThe number of minutes to wait between mail checks
A malformed parameter string will not generate an exception, however, the filter will be unable to connect, and thus be rendered inoperable. If the delay parameter is missing or malformed, it will default to 30 minutes. The internet guideline is for the delay to be at least 30 minutes.

Method Detail

initialize

public void initialize()
Description copied from interface: DelayedFeature
Called to initialize the feature. See the Email class for details of the load sequence.

Specified by:
initialize in interface DelayedFeature

release

public void release()
Description copied from interface: TALFeature
Releases all system resources held by this object. The general contract of pluggable features is that once their release method is called, they should be elligible for garbage collection. The exceptions to this are references to this object held in the ActionDispatcher and in the Transport model. Both of those objects are cleared by the system. However, in all other cases, if this object subscribed to a listener interface, it must unsubscribe in this method. This method should block until all object clean-up has been accomplished. This includes closing all open files, etc. Once the object has returned from the release method, the system may go down without further warning.

Specified by:
release in interface TALFeature
Overrides:
release in class ReceiverFilterAdapter

filterMessage

protected boolean filterMessage(javax.mail.internet.MimeMessage msg)
Description copied from class: ReceiverFilterAdapter
This method is called by NewMailArrived and OldMailArrived to decide whether to pass the message along. Subclasses may wish to have side effects occur in this method as well as the return value.

Specified by:
filterMessage in class ReceiverFilterAdapter
Parameters:
msg - The message to be filtered by this method.
Returns:
true if the message should be passed along, false if the message should be dropped.

toString

public java.lang.String toString()
Description copied from class: ReceiverFilterAdapter
Returns the classname of this filter.

Overrides:
toString in class ReceiverFilterAdapter

talx x1.0.5

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