org.objectweb.jonas.mail.factory
Class JavaMailSession
java.lang.Object
org.objectweb.jonas.mail.factory.JavaMail
org.objectweb.jonas.mail.factory.JavaMailSession
- All Implemented Interfaces:
- javax.naming.Referenceable, java.io.Serializable
- public class JavaMailSession
- extends JavaMail
This class provides a way for referencing mail session.
- Author:
- Florent Benoit, Ludovic Bert
- See Also:
- Serialized Form
|
Constructor Summary |
JavaMailSession(java.lang.String factoryName,
java.lang.String name,
java.util.Properties mailProperties)
Constructor of a JMailSession Object. |
|
Method Summary |
javax.naming.Reference |
getReference()
Retrieves the Reference of the javax.mail.Session object. |
java.lang.String |
getType()
Return the type of the factory |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JavaMailSession
public JavaMailSession(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 namemailProperties - properties for configuring this object.
getType
public java.lang.String getType()
- Return the type of the factory
- Specified by:
getType in class JavaMail
- 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 JavaMailSessionFactory) and the optional parameters used to
configure the factory.
- Specified by:
getReference in interface javax.naming.Referenceable- Specified by:
getReference in class JavaMail
- 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.