org.objectweb.jonas.mail.MailServiceImpl Class Reference

Inherits org.objectweb.jonas.mail.MailService, and org.objectweb.jonas.mail.MailServiceImplMBean.

Inheritance diagram for org.objectweb.jonas.mail.MailServiceImpl:

Inheritance graph
[legend]
Collaboration diagram for org.objectweb.jonas.mail.MailServiceImpl:

Collaboration graph
[legend]
List of all members.

Public Member Functions

void recreateJavaMailFactory (JavaMail factory) throws MailServiceException
void renameJavaMailFactory (String oldName, JavaMail factory) throws MailServiceException
void createMailFactory (String factoryName, Properties props) throws MailServiceException
void createMailFactoryMBean (String name, Properties props, Boolean loadFromFile) throws MailServiceException
void unbindMailFactories () throws MailServiceException
void unbindMailFactoryMBean (String factoryName) throws MailServiceException
String getFactoryName (String jndiName)
Integer getCurrentNumberOfMailFactories ()
Integer getCurrentNumberOfSessionMailFactories ()
Integer getCurrentNumberOfMimeMailFactories ()
Properties getMailFactoryPropertiesFile (String configFile) throws Exception
List getMailFactoryPropertiesFiles () throws Exception
List getMimePartMailFactoryPropertiesFiles () throws Exception
List getSessionMailFactoryPropertiesFiles () throws Exception

Static Public Attributes

final String PROPERTY_NAME = "mail.factory.name"
final String PROPERTY_TYPE = "mail.factory.type"
final String FACTORIES = "jonas.service.mail.factories"
final String CLASS = "jonas.service.mail.class"

Protected Member Functions

void doInit (Context ctx) throws ServiceException
void doStart () throws ServiceException
void doStop () throws ServiceException

Detailed Description

This class provides an implementation of the javaMail service.
Author:
Florent Benoit

Ludovic Bert Contributor(s): Adriana Danes :

Definition at line 75 of file MailServiceImpl.java.


Member Function Documentation

void org.objectweb.jonas.mail.MailServiceImpl.createMailFactory String  factoryName,
Properties  props
throws MailServiceException
 

Create a mail factory with the specified properties and register it into the registry.

Parameters:
factoryName name of the factory to create
props the properties used to configure the mail factory.
Exceptions:
MailServiceException if the creation or the registration of the factory failed.

Implements org.objectweb.jonas.mail.MailService.

Definition at line 338 of file MailServiceImpl.java.

References org.objectweb.jonas.mail.MailServiceImpl.PROPERTY_NAME, and org.objectweb.jonas.mail.MailServiceImpl.PROPERTY_TYPE.

Referenced by org.objectweb.jonas.mail.MailServiceImpl.createMailFactoryMBean(), and org.objectweb.jonas.mail.MailServiceImpl.doStart().

void org.objectweb.jonas.mail.MailServiceImpl.createMailFactoryMBean String  name,
Properties  props,
Boolean  loadFromFile
throws MailServiceException
 

Create a mail factory with the specified properties and register it into the registry.

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

Implements org.objectweb.jonas.mail.MailServiceImplMBean.

Definition at line 460 of file MailServiceImpl.java.

References org.objectweb.jonas.mail.MailServiceImpl.createMailFactory().

Here is the call graph for this function:

void org.objectweb.jonas.mail.MailServiceImpl.doInit Context  ctx  )  throws ServiceException [protected]
 

Init the Mail service.

Parameters:
ctx the configuration of the Ear service.
Exceptions:
ServiceException if the initialization failed.

Definition at line 168 of file MailServiceImpl.java.

References org.objectweb.jonas.mail.MailServiceImpl.FACTORIES.

void org.objectweb.jonas.mail.MailServiceImpl.doStart  )  throws ServiceException [protected]
 

Start the Mail Service.

Exceptions:
ServiceException if the initialization failed.

Definition at line 222 of file MailServiceImpl.java.

References org.objectweb.jonas.mail.MailServiceImpl.createMailFactory(), and org.objectweb.jonas.common.JProp.getConfigFileEnv().

Here is the call graph for this function:

void org.objectweb.jonas.mail.MailServiceImpl.doStop  )  throws ServiceException [protected]
 

Stop the Mail service.

Exceptions:
ServiceException if the stop failed.

Definition at line 257 of file MailServiceImpl.java.

References org.objectweb.jonas.mail.MailServiceImpl.unbindMailFactories().

Here is the call graph for this function:

Integer org.objectweb.jonas.mail.MailServiceImpl.getCurrentNumberOfMailFactories  ) 
 

Gets the total number of mail factories available in JOnAS

Returns:
Integer Total number of mail factories available in JOnAS

Implements org.objectweb.jonas.mail.MailServiceImplMBean.

Definition at line 573 of file MailServiceImpl.java.

Integer org.objectweb.jonas.mail.MailServiceImpl.getCurrentNumberOfMimeMailFactories  ) 
 

Gets the integer Number of internet

Returns:
Integer Number of internet.MimePartDataSource mail factories available in JOnAS

Implements org.objectweb.jonas.mail.MailServiceImplMBean.

Definition at line 589 of file MailServiceImpl.java.

Integer org.objectweb.jonas.mail.MailServiceImpl.getCurrentNumberOfSessionMailFactories  ) 
 

Gets the number of Session mail factories available in JOnAS

Returns:
Integer Number of Session mail factories available in JOnAS

Implements org.objectweb.jonas.mail.MailServiceImplMBean.

Definition at line 581 of file MailServiceImpl.java.

String org.objectweb.jonas.mail.MailServiceImpl.getFactoryName String  jndiName  ) 
 

Gets the factory name given the jndi name. Null is returned if the given name is not binded.

Parameters:
jndiName the jndi name
Returns:
the factory name given the jndi name. Null is returned if the given name is not binded.

Definition at line 565 of file MailServiceImpl.java.

Referenced by org.objectweb.jonas.container.EJB.getAllMailFactoryMName(), and org.objectweb.jonas.container.EJB.getAllMailFactorySName().

Properties org.objectweb.jonas.mail.MailServiceImpl.getMailFactoryPropertiesFile String  configFile  )  throws 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
Exceptions:
Exception if it fails

Implements org.objectweb.jonas.mail.MailServiceImplMBean.

Definition at line 599 of file MailServiceImpl.java.

List org.objectweb.jonas.mail.MailServiceImpl.getMailFactoryPropertiesFiles  )  throws Exception
 

MBean method:

Returns:
the list of properties files describing mail factories found in JONAS_BASE/conf

Implements org.objectweb.jonas.mail.MailServiceImplMBean.

Definition at line 616 of file MailServiceImpl.java.

List org.objectweb.jonas.mail.MailServiceImpl.getMimePartMailFactoryPropertiesFiles  )  throws Exception
 

MBean method:

Returns:
the list of properties files describing mail factories found in JONAS_BASE/conf

Implements org.objectweb.jonas.mail.MailServiceImplMBean.

Definition at line 623 of file MailServiceImpl.java.

List org.objectweb.jonas.mail.MailServiceImpl.getSessionMailFactoryPropertiesFiles  )  throws Exception
 

MBean method:

Returns:
the list of properties files describing mail factories found in JONAS_BASE/conf

Implements org.objectweb.jonas.mail.MailServiceImplMBean.

Definition at line 630 of file MailServiceImpl.java.

void org.objectweb.jonas.mail.MailServiceImpl.recreateJavaMailFactory JavaMail  factory  )  throws MailServiceException
 

This method is used when a Mail Factory configuration is modified via jonasAdmin. In this case, the updated JavaMail object (JavaMailSession or JavaMailMimePartDS object) must be rebound in JNDI

Parameters:
factory the factory
Exceptions:
MailServiceException if the recreation of the factory failed.

Implements org.objectweb.jonas.mail.MailService.

Definition at line 286 of file MailServiceImpl.java.

void org.objectweb.jonas.mail.MailServiceImpl.renameJavaMailFactory String  oldName,
JavaMail  factory
throws MailServiceException
 

This method is used when a particular Mail Factory configuration operation is done via jonasAdmin : when the JNDI name of this resource is modified. In this case, the initial JavaMail object (JavaMailSession or JavaMailMimePartDS object) must be unbound and the updated JavaMail object must be reloaded. Also, the Mail Service private data structures must be updated.

Parameters:
oldName old name of the factory
factory the new factory
Exceptions:
MailServiceException if the rename of the the factory failed.

Implements org.objectweb.jonas.mail.MailService.

Definition at line 308 of file MailServiceImpl.java.

void org.objectweb.jonas.mail.MailServiceImpl.unbindMailFactories  )  throws MailServiceException
 

Unregister all the binding factories on the server and in JMX Server.

Exceptions:
MailServiceException if the unregistration of the factories failed.

Implements org.objectweb.jonas.mail.MailService.

Definition at line 487 of file MailServiceImpl.java.

References org.objectweb.jonas.mail.MailServiceImpl.unbindMailFactoryMBean().

Referenced by org.objectweb.jonas.mail.MailServiceImpl.doStop().

Here is the call graph for this function:

void org.objectweb.jonas.mail.MailServiceImpl.unbindMailFactoryMBean String  factoryName  )  throws MailServiceException
 

Unregister the factory with the given name.

Parameters:
factoryName the name of the factory to unbind.
Exceptions:
MailServiceException if the unregistration of the factory failed.

Implements org.objectweb.jonas.mail.MailServiceImplMBean.

Definition at line 503 of file MailServiceImpl.java.

References org.objectweb.jonas.mail.factory.JavaMail.getName().

Referenced by org.objectweb.jonas.mail.MailServiceImpl.unbindMailFactories().

Here is the call graph for this function:


Member Data Documentation

final String org.objectweb.jonas.mail.MailServiceImpl.CLASS = "jonas.service.mail.class" [static]
 

Mail service configuration parameters (class)

Definition at line 161 of file MailServiceImpl.java.

final String org.objectweb.jonas.mail.MailServiceImpl.FACTORIES = "jonas.service.mail.factories" [static]
 

Mail service configuration parameters (factories)

Definition at line 156 of file MailServiceImpl.java.

Referenced by org.objectweb.jonas.mail.MailServiceImpl.doInit().

final String org.objectweb.jonas.mail.MailServiceImpl.PROPERTY_NAME = "mail.factory.name" [static]
 

JOnAS-specific properties (name)

Definition at line 143 of file MailServiceImpl.java.

Referenced by org.objectweb.jonas.mail.MailServiceImpl.createMailFactory().

final String org.objectweb.jonas.mail.MailServiceImpl.PROPERTY_TYPE = "mail.factory.type" [static]
 

JOnAS-specific properties (type)

Definition at line 148 of file MailServiceImpl.java.

Referenced by org.objectweb.jonas.mail.MailServiceImpl.createMailFactory().


The documentation for this class was generated from the following file:
Generated on Tue Feb 15 15:07:05 2005 for JOnAS by  doxygen 1.3.9.1