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

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

public class JavaMailSession
extends AbstractJavaMail

This class provides a way for referencing mail session.

Author:
Florent Benoit, Ludovic Bert

Constructor Summary
JavaMailSession(String factoryName, String name, Properties mailProperties, MailService mailService)
          Constructor of a JMailSession Object.
 
Method Summary
 Reference getReference()
          Retrieves the Reference of the javax.mail.Session object.
 String getType()
          Return the type of the factory.
 
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
 

Constructor Detail

JavaMailSession

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

Parameters:
factoryName - the name of the factory.
name - the jndi name
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

getReference

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

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


Copyright © 2010 OW2 Consortium. All Rights Reserved.