org.ow2.jonas.mail.internal.factory
Class JavaMailSession
java.lang.Object
org.ow2.jonas.mail.internal.factory.AbstractJavaMail
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
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 |
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 namemailProperties
- properties for configuring this object.
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.