org.objectweb.jonas.mail.factory
Class JMailMimePartDS

java.lang.Object
  extended byorg.objectweb.jonas.management.ReconfigDispatcher
      extended byorg.objectweb.jonas.mail.factory.JMail
          extended byorg.objectweb.jonas.mail.factory.JMailMimePartDS
All Implemented Interfaces:
JMailMBean, JMailMimePartDSMBean, javax.management.NotificationBroadcaster, ReconfigDispatcherMBean, 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
          JOnAS-specific property for Mime Messages configuration (mail.bcc)
protected static java.lang.String MIMEMESSAGE_CC
          JOnAS-specific property for Mime Messages configuration (mail.cc)
protected static java.lang.String MIMEMESSAGE_SUBJECT
          JOnAS-specific property for Mime Messages configuration (mail.subject)
protected static java.lang.String MIMEMESSAGE_TO
          JOnAS-specific property for Mime Messages configuration (mail.to)
protected  long sequenceNumber
          Value used as sequence number by reconfiguration notifications
 
Fields inherited from class org.objectweb.jonas.mail.factory.JMail
authenticationProperties, logger, mailSessionProperties
 
Fields inherited from class org.objectweb.jonas.management.ReconfigDispatcher
RECONFIG_TYPE, SAVE_RECONFIG_TYPE
 
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.
protected  long getSequenceNumber()
          Gets the sequence number for MBeans operations
 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, saveConfig, setAuthenticationProperties, setName, setSessionProperties
 
Methods inherited from class org.objectweb.jonas.management.ReconfigDispatcher
addNotificationListener, getFilter, getHandback, getListener, getNotificationInfo, initLogger, removeNotificationListener, sendReconfigNotification, sendSaveNotification
 
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, saveConfig, setAuthenticationProperties, setName, setSessionProperties
 

Field Detail

MIMEMESSAGE_TO

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

See Also:
Constant Field Values

MIMEMESSAGE_CC

protected static final java.lang.String MIMEMESSAGE_CC
JOnAS-specific property for Mime Messages configuration (mail.cc)

See Also:
Constant Field Values

MIMEMESSAGE_BCC

protected static final java.lang.String MIMEMESSAGE_BCC
JOnAS-specific property for Mime Messages configuration (mail.bcc)

See Also:
Constant Field Values

MIMEMESSAGE_SUBJECT

protected static final java.lang.String MIMEMESSAGE_SUBJECT
JOnAS-specific property for Mime Messages configuration (mail.subject)

See Also:
Constant Field Values

sequenceNumber

protected long sequenceNumber
Value used as sequence number by reconfiguration notifications

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

Specified by:
_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.

Specified by:
getReference in interface javax.naming.Referenceable
Specified by:
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.

getSequenceNumber

protected long getSequenceNumber()
Gets the sequence number for MBeans operations

Specified by:
getSequenceNumber in class JMail
Returns:
the sequence number for MBeans operations