1 /*
2 * Copyright (C) The Apache Software Foundation. All rights reserved.
3 *
4 * This software is published under the terms of the Apache Software License
5 * version 1.1, a copy of which has been included with this distribution in
6 * the LICENSE file.
7 */
8 package org.apache.mailet;
9
10 import java.util.Iterator;
11
12 /***
13 * A mailet configuration object used by a mailet container used to pass information
14 * to a mailet during initialization.
15 * <p>
16 * The configuration information contains initialization parameters, which are a set
17 * of name/value pairs, and a MailetContext object, which gives the mailet information
18 * about the server.
19 *
20 * @version 1.0.0, 24/04/1999
21 * @author Serge Knystautas <sergek@lokitech.com>
22 */
23 public interface MailetConfig {
24
25 /***
26 * Returns a String containing the value of the named initialization
27 * parameter, or null if the parameter does not exist.
28 *
29 * @param name - a String specifying the name of the initialization parameter
30 * @return a String containing the value of the initialization parameter
31 */
32 String getInitParameter(String name);
33
34 /***
35 * Returns the names of the mailet's initialization parameters as an
36 * Iterator of String objects, or an empty Iterator if the mailet has
37 * no initialization parameters.
38 *
39 * @return an Iterator of String objects containing the names of the mailet's
40 * initialization parameters
41 */
42 Iterator getInitParameterNames();
43
44 /***
45 * Returns a reference to the MailetContext in which the mailet is
46 * executing.
47 *
48 * @return a MailetContext object, used by the mailet to interact with its
49 * mailet container
50 */
51 MailetContext getMailetContext();
52
53 /***
54 * Returns the name of this mailet instance. The name may be provided via
55 * server administration, assigned in the application deployment descriptor,
56 * or for an unregistered (and thus unnamed) mailet instance it will be the
57 * mailet's class name.
58 *
59 * @return the name of the mailet instance
60 */
61 String getMailetName();
62 }
This page was automatically generated by Maven