org.objectweb.jonas.mail
Interface MailServiceImplMBean

All Known Implementing Classes:
MailServiceImpl

public interface MailServiceImplMBean

This interface provides a description for the mail service management.

Author:
Ludovic Bert, Florent Benoit

Method Summary
 void createMailFactoryMBean(java.lang.String name, java.util.Properties props, java.lang.Boolean loadFromFile)
          Create a mail factory with the specified properties and register it into the registry.
 java.lang.Integer getCurrentNumberOfMailFactories()
           
 java.lang.Integer getCurrentNumberOfMimeMailFactories()
           
 java.lang.Integer getCurrentNumberOfSessionMailFactories()
           
 java.util.Properties getMailFactoryPropertiesFile(java.lang.String configFile)
          Gets the mail factory configuration properties from a local file
 java.util.List getMailFactoryPropertiesFiles()
           
 java.util.List getMimePartMailFactoryPropertiesFiles()
           
 java.util.List getSessionMailFactoryPropertiesFiles()
           
 void unbindMailFactoryMBean(java.lang.String name)
          Unregister the factory binded with the given name.
 

Method Detail

createMailFactoryMBean

void createMailFactoryMBean(java.lang.String name,
                            java.util.Properties props,
                            java.lang.Boolean loadFromFile)
                            throws MailServiceException
Create a mail factory with the specified properties and register it into the registry.

Parameters:
name - the name of the mail factory
props - the properties used to configure the mail factory.
loadFromFile - true if the mail factory is loaded from a .properties file
Throws:
MailServiceException - if the creation or the registration of the factory failed.

getCurrentNumberOfMailFactories

java.lang.Integer getCurrentNumberOfMailFactories()
Returns:
Integer Total number of mail factories available in JOnAS

getCurrentNumberOfMimeMailFactories

java.lang.Integer getCurrentNumberOfMimeMailFactories()
Returns:
Integer Number of internet.MimePartDataSource mail factories available in JOnAS

getCurrentNumberOfSessionMailFactories

java.lang.Integer getCurrentNumberOfSessionMailFactories()
Returns:
Integer Number of mail Session mail factories available in JOnAS

getMailFactoryPropertiesFile

java.util.Properties getMailFactoryPropertiesFile(java.lang.String configFile)
                                                  throws java.lang.Exception
Gets the mail factory configuration properties from a local file

Parameters:
configFile - configuration to use
Returns:
mail factory configuration properties from a local file
Throws:
java.lang.Exception - if it fails

getMailFactoryPropertiesFiles

java.util.List getMailFactoryPropertiesFiles()
                                             throws java.lang.Exception
Returns:
the list of properties files describeing mail factories found in JONAS_BASE/conf
Throws:
java.lang.Exception - if the list can't be returned

getMimePartMailFactoryPropertiesFiles

java.util.List getMimePartMailFactoryPropertiesFiles()
                                                     throws java.lang.Exception
Returns:
the list of properties files describeing MimePartDataSource mail factories found in JONAS_BASE/conf
Throws:
java.lang.Exception - if the list can't be returned

getSessionMailFactoryPropertiesFiles

java.util.List getSessionMailFactoryPropertiesFiles()
                                                    throws java.lang.Exception
Returns:
the list of properties files describeing Session mail factories found in JONAS_BASE/conf
Throws:
java.lang.Exception - if the list can't be returned

unbindMailFactoryMBean

void unbindMailFactoryMBean(java.lang.String name)
                            throws MailServiceException
Unregister the factory binded with the given name.

Parameters:
name - the name of the factory.
Throws:
MailServiceException - if the unregistration of the factory failed.