org.objectweb.jonas.mail.factory
Class JMailSession
java.lang.Object
org.objectweb.jonas.management.ReconfigDispatcher
org.objectweb.jonas.mail.factory.JMail
org.objectweb.jonas.mail.factory.JMailSession
- All Implemented Interfaces:
- JMailMBean, JMailSessionMBean, javax.management.NotificationBroadcaster, ReconfigDispatcherMBean, 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
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. |
protected long |
getSequenceNumber()
Gets the sequence number for MBeans operations |
Methods inherited from class org.objectweb.jonas.mail.factory.JMail |
_getFactoryName, _getName, getAuthenticationProperties, getBytesFromObject, getFactoryName, getFactoryType, getName, getSessionProperties, saveConfig, setAuthenticationProperties, setName, setSessionProperties |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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 namemailProperties
- properties for configuring this object.
_getType
public java.lang.String _getType()
- Return the type of the factory
- Specified by:
_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.
- Specified by:
getReference
in interface javax.naming.Referenceable
- Specified by:
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.
getSequenceNumber
protected long getSequenceNumber()
- Gets the sequence number for MBeans operations
- Specified by:
getSequenceNumber
in class JMail
- Returns:
- the sequence number for MBeans operations