org.apache.james.services
Interface SpoolRepository.AcceptFilter

Enclosing interface:
SpoolRepository

public static interface SpoolRepository.AcceptFilter

Implementations of AcceptFilter can be used to select which mails a SpoolRepository implementation returns from its accept (AcceptFilter) method


Method Summary
 boolean accept(java.lang.String key, java.lang.String state, long lastUpdated, java.lang.String errorMessage)
          This method is called by accept(Filter) to determine if the message is ready for delivery.
 long getWaitTime()
          This method allows the filter to determine how long the thread should wait for a message to get ready for delivery, when currently there are none.
 

Method Detail

accept

boolean accept(java.lang.String key,
               java.lang.String state,
               long lastUpdated,
               java.lang.String errorMessage)
This method is called by accept(Filter) to determine if the message is ready for delivery.

Parameters:
key - message key
state - the state of the message
lastUpdated - the last time the message was written to the spool
errorMessage - the current errorMessage
Returns:
true if the message is ready for delivery

getWaitTime

long getWaitTime()
This method allows the filter to determine how long the thread should wait for a message to get ready for delivery, when currently there are none.

Returns:
the time to wait for a message to get ready for delivery


Copyright ? 2002-2009 The Apache Software Foundation. All Rights Reserved.