org.objectweb.jonas.mail.factory
Class JMailSession

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

public class JMailSession
extends JMail
implements JMailSessionMBean

This class provides a way for referencing mail session.

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

Fields inherited from class org.objectweb.jonas.mail.factory.JMail
authenticationProperties, logger, mailSessionProperties
 
Constructor Summary
JMailSession(java.lang.String factoryName, java.lang.String name, java.util.Properties mailProperties)
          Constructor of a JMailSession Object.
 
Method Summary
 java.lang.String _getType()
          Return the type of the factory
 javax.naming.Reference getReference()
          Retrieves the Reference of the javax.mail.Session object.
 
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
 

Constructor Detail

JMailSession

public JMailSession(java.lang.String factoryName,
                    java.lang.String name,
                    java.util.Properties mailProperties)
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 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.Session object. The Reference contains the factory used to create this object (that is the JMailSessionFactory) and the optional parameters used to configure the factory.
Overrides:
getReference in class JMail
Returns:
the non-null Reference of the javax.mail.Session object.
Throws:
javax.naming.NamingException - if a naming exception was encountered while retrieving the reference.