org.ow2.jonas.mail.internal.factory
Class JavaMailMimePartDS

java.lang.Object
  extended by org.ow2.jonas.mail.internal.factory.AbstractJavaMail
      extended by org.ow2.jonas.mail.internal.factory.JavaMailMimePartDS
All Implemented Interfaces:
Referenceable, JavaMail

public class JavaMailMimePartDS
extends AbstractJavaMail

This class provides a way for referencing mail session.

Author:
Florent Benoit, Ludovic Bert

Field Summary
protected static String MIMEMESSAGE_BCC
          JOnAS-specific property for Mime Messages configuration (mail.bcc).
protected static String MIMEMESSAGE_CC
          JOnAS-specific property for Mime Messages configuration (mail.cc).
protected static String MIMEMESSAGE_SUBJECT
          JOnAS-specific property for Mime Messages configuration (mail.subject).
protected static String MIMEMESSAGE_TO
          JOnAS-specific property for Mime Messages configuration (mail.to).
 
Constructor Summary
JavaMailMimePartDS(String factoryName, String name, Properties mailProperties, MailService mailService)
          Constructor of a JavaMailMimePartDS Object.
 
Method Summary
 Properties getMimeMessageProperties()
          Retrieves the mimeMessage properties of this object.
 Reference getReference()
          Retrieves the Reference of the javax.mail.MimePartDataSource object.
 String getType()
          Return the type of the factory.
 void setMimeMessageProperties(Properties props)
          Set the mimeMessage properties of this object.
 
Methods inherited from class org.ow2.jonas.mail.internal.factory.AbstractJavaMail
getAuthenticationProperties, getFactoryName, getLogger, getMailService, getMailSessionProperties, getName, getSessionProperties, setAuthenticationProperties, setLogger, setMailSessionProperties, setName, setSessionProperties
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MIMEMESSAGE_TO

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

See Also:
Constant Field Values

MIMEMESSAGE_CC

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

See Also:
Constant Field Values

MIMEMESSAGE_BCC

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

See Also:
Constant Field Values

MIMEMESSAGE_SUBJECT

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

See Also:
Constant Field Values
Constructor Detail

JavaMailMimePartDS

public JavaMailMimePartDS(String factoryName,
                          String name,
                          Properties mailProperties,
                          MailService mailService)
Constructor of a JavaMailMimePartDS Object.

Parameters:
factoryName - the name of the factory.
name - the name of this object.
mailProperties - properties for configuring this object.
Method Detail

getType

public String getType()
Return the type of the factory.

Returns:
the type of the mail factory

getMimeMessageProperties

public Properties getMimeMessageProperties()
Retrieves the mimeMessage properties of this object.

Returns:
the mimeMessage properties of this object.

setMimeMessageProperties

public void setMimeMessageProperties(Properties props)
Set the mimeMessage properties of this object.

Parameters:
props - the mimeMessage properties

getReference

public Reference getReference()
                       throws NamingException
Retrieves the Reference of the javax.mail.MimePartDataSource object. The Reference contains the factory used to create this object (that is the JavaMimePartDSFactory) and the optional parameters used to configure the factory.

Returns:
the non-null Reference of the javax.mail.MimePartDataSource object.
Throws:
NamingException - if a naming exception was encountered while retrieving the reference.


Copyright © 2010 OW2 Consortium. All Rights Reserved.