KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jonas > mail > MailServiceImplMBean


1 /**
2  * JOnAS: Java(TM) Open Application Server
3  * Copyright (C) 1999 Bull S.A.
4  * Contact: jonas-team@objectweb.org
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19  * USA
20  *
21  * Initial developer(s): Florent BENOIT & Ludovic BERT
22  * --------------------------------------------------------------------------
23  * $Id: MailServiceImplMBean.java,v 1.8 2004/04/09 10:00:58 benoitf Exp $
24  * --------------------------------------------------------------------------
25  */

26
27 package org.objectweb.jonas.mail;
28
29 //import java
30
import java.util.Properties JavaDoc;
31 import java.util.List JavaDoc;
32
33 /**
34  * This interface provides a description for the mail service management.
35  * @author Ludovic Bert
36  * @author Florent Benoit
37  */

38 public interface MailServiceImplMBean {
39
40     /**
41      * Create a mail factory with the specified properties and register it into
42      * the registry.
43      * @param name the name of the mail factory
44      * @param props the properties used to configure the mail factory.
45      * @param loadFromFile true if the mail factory is loaded from a .properties
46      * file
47      * @throws MailServiceException if the creation or the registration of the
48      * factory failed.
49      */

50     void createMailFactoryMBean(String JavaDoc name, Properties JavaDoc props, Boolean JavaDoc loadFromFile) throws MailServiceException;
51
52     /**
53      * @return Integer Total number of mail factories available in JOnAS
54      */

55     Integer JavaDoc getCurrentNumberOfMailFactories();
56
57     /**
58      * @return Integer Number of internet.MimePartDataSource mail factories
59      * available in JOnAS
60      */

61     Integer JavaDoc getCurrentNumberOfMimeMailFactories();
62
63     /**
64      * @return Integer Number of mail Session mail factories available in JOnAS
65      */

66     Integer JavaDoc getCurrentNumberOfSessionMailFactories();
67
68     /**
69      * Gets the mail factory configuration properties from a local file
70      * @param configFile configuration to use
71      * @return mail factory configuration properties from a local file
72      * @throws Exception if it fails
73      */

74     Properties JavaDoc getMailFactoryPropertiesFile(String JavaDoc configFile) throws Exception JavaDoc;
75
76     /**
77      * @return the list of properties files describeing mail factories found in
78      * JONAS_BASE/conf
79      * @throws Exception if the list can't be returned
80      */

81     List JavaDoc getMailFactoryPropertiesFiles() throws Exception JavaDoc;
82
83     /**
84      * @return the list of properties files describeing MimePartDataSource mail
85      * factories found in JONAS_BASE/conf
86      * @throws Exception if the list can't be returned
87      */

88     List JavaDoc getMimePartMailFactoryPropertiesFiles() throws Exception JavaDoc;
89
90     /**
91      * @return the list of properties files describeing Session mail factories
92      * found in JONAS_BASE/conf
93      * @throws Exception if the list can't be returned
94      */

95     List JavaDoc getSessionMailFactoryPropertiesFiles() throws Exception JavaDoc;
96
97     /**
98      * Unregister the factory binded with the given name.
99      * @param name the name of the factory.
100      * @throws MailServiceException if the unregistration of the factory failed.
101      */

102     void unbindMailFactoryMBean(String JavaDoc name) throws MailServiceException;
103
104 }
Popular Tags