org.objectweb.jonas.mail.factory
Class JMailMimePartDS

java.lang.Object
  |
  +--org.objectweb.jonas.mail.factory.JMail
        |
        +--org.objectweb.jonas.mail.factory.JMailMimePartDS
All Implemented Interfaces:
JMailMBean, JMailMimePartDSMBean, javax.naming.Referenceable, java.io.Serializable

public class JMailMimePartDS
extends JMail
implements JMailMimePartDSMBean

This class provides a way for referencing mail session.

Author:
Florent Benoit, Ludovic Bert
See Also:
Serialized Form

Field Summary
protected static java.lang.String MIMEMESSAGE_BCC
           
protected static java.lang.String MIMEMESSAGE_CC
           
protected static java.lang.String MIMEMESSAGE_SUBJECT
           
protected static java.lang.String MIMEMESSAGE_TO
          JOnAS-specific property for Mime Messages configuration
 
Fields inherited from class org.objectweb.jonas.mail.factory.JMail
authenticationProperties, logger, mailSessionProperties
 
Constructor Summary
JMailMimePartDS(java.lang.String factoryName, java.lang.String name, java.util.Properties mailProperties)
          Constructor of a JMimePartDS Object
 
Method Summary
 java.lang.String _getType()
          Return the type of the factory
 java.util.Properties getMimeMessageProperties()
          Get the mimePartDatasource properties.
 javax.naming.Reference getReference()
          Retrieves the Reference of the javax.mail.MimePartDataSource object.
 void setMimeMessageProperties(java.util.Properties props)
          Set the mimePartDatasource properties.
 
Methods inherited from class org.objectweb.jonas.mail.factory.JMail
_getFactoryName, _getName, getAuthenticationProperties, getBytesFromObject, getFactoryName, getFactoryType, getName, getSessionProperties, setAuthenticationProperties, setName, setSessionProperties
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.objectweb.jonas.mail.factory.JMailMBean
getAuthenticationProperties, getFactoryName, getFactoryType, getName, getSessionProperties, setAuthenticationProperties, setName, setSessionProperties
 

Field Detail

MIMEMESSAGE_TO

protected static final java.lang.String MIMEMESSAGE_TO
JOnAS-specific property for Mime Messages configuration

MIMEMESSAGE_CC

protected static final java.lang.String MIMEMESSAGE_CC

MIMEMESSAGE_BCC

protected static final java.lang.String MIMEMESSAGE_BCC

MIMEMESSAGE_SUBJECT

protected static final java.lang.String MIMEMESSAGE_SUBJECT
Constructor Detail

JMailMimePartDS

public JMailMimePartDS(java.lang.String factoryName,
                       java.lang.String name,
                       java.util.Properties mailProperties)
Constructor of a JMimePartDS Object
Parameters:
factoryName - the name of the factory.
name - the name of this object.
mailProperties - properties for configuring this object.
Method Detail

_getType

public java.lang.String _getType()
Return the type of the factory
Overrides:
_getType in class JMail
Returns:
the type of the mail factory

getReference

public javax.naming.Reference getReference()
                                    throws javax.naming.NamingException
Retrieves the Reference of the javax.mail.MimePartDataSource object. The Reference contains the factory used to create this object (that is the JMimePartDSFactory) and the optional parameters used to configure the factory.
Overrides:
getReference in class JMail
Returns:
the non-null Reference of the javax.mail.MimePartDataSource object.
Throws:
javax.naming.NamingException - if a naming exception was encountered while retrieving the reference.

getMimeMessageProperties

public java.util.Properties getMimeMessageProperties()
Get the mimePartDatasource properties.
Specified by:
getMimeMessageProperties in interface JMailMimePartDSMBean
Returns:
the properties of Session.

setMimeMessageProperties

public void setMimeMessageProperties(java.util.Properties props)
Set the mimePartDatasource properties.
Specified by:
setMimeMessageProperties in interface JMailMimePartDSMBean
Parameters:
props - the authentication properties.
Throws:
java.rmi.RemoteException - if rmi call failed.