01: /*
02: * Copyright 2001-2007 Geert Bevin <gbevin[remove] at uwyn dot com>
03: * Distributed under the terms of either:
04: * - the common development and distribution license (CDDL), v1.0; or
05: * - the GNU Lesser General Public License, v2.1 or later
06: * $Id: MailQueueExecutor.java 3634 2007-01-08 21:42:24Z gbevin $
07: */
08: package com.uwyn.rife.mail;
09:
10: import com.uwyn.rife.mail.Email;
11:
12: /**
13: * This interface has to be implemented by all {@link
14: * com.uwyn.rife.scheduler.Executor Executor}s that will process the mail
15: * queue.
16: *
17: * @author Geert Bevin (gbevin[remove] at uwyn dot com)
18: * @version $Revision: 3634 $
19: * @see com.uwyn.rife.mail.Email
20: * @since 1.0
21: */
22: public interface MailQueueExecutor {
23: /**
24: * Checks whether an <code>Email</code> instance is allowed to be
25: * delivered. This is called before sending each message so that it's
26: * possible to filter out email that for some reason is not allowed
27: * for delivery. The email will then simply be skipped.
28: *
29: * @param email The <code>Email</code> instance that should be
30: * verified
31: * @return <code>true</code> if the email is allowed to be delivered;
32: * or
33: * <p><code>false</code> otherwise
34: * @since 1.0
35: */
36: public boolean isDeliveryAllowed(Email email);
37: }
|