org.eclipse.jetty.jndi.factories
Class MailSessionReference
java.lang.Object
javax.naming.Reference
org.eclipse.jetty.jndi.factories.MailSessionReference
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, javax.naming.spi.ObjectFactory
public class MailSessionReference
- extends javax.naming.Reference
- implements javax.naming.spi.ObjectFactory
MailSessionReference
This is a subclass of javax.mail.Reference and an ObjectFactory for javax.mail.Session objects.
The subclassing of Reference allows all of the setup for a javax.mail.Session
to be captured without necessitating first instantiating a Session object. The
reference is bound into JNDI and it is only when the reference is looked up that
this object factory will create an instance of javax.mail.Session using the
information captured in the Reference.
- See Also:
- Serialized Form
Fields inherited from class javax.naming.Reference |
addrs, classFactory, classFactoryLocation, className |
Method Summary |
java.lang.Object |
getObjectInstance(java.lang.Object ref,
javax.naming.Name arg1,
javax.naming.Context arg2,
java.util.Hashtable arg3)
Create a javax.mail.Session instance based on the information passed in the Reference |
void |
setPassword(java.lang.String password)
|
void |
setProperties(java.util.Properties properties)
|
void |
setUser(java.lang.String user)
|
Methods inherited from class javax.naming.Reference |
add, add, clear, clone, equals, get, get, getAll, getClassName, getFactoryClassLocation, getFactoryClassName, hashCode, remove, size, toString |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
MailSessionReference
public MailSessionReference()
getObjectInstance
public java.lang.Object getObjectInstance(java.lang.Object ref,
javax.naming.Name arg1,
javax.naming.Context arg2,
java.util.Hashtable arg3)
throws java.lang.Exception
- Create a javax.mail.Session instance based on the information passed in the Reference
- Specified by:
getObjectInstance
in interface javax.naming.spi.ObjectFactory
- Parameters:
ref
- the Referencearg1
- not usedarg2
- not usedarg3
- not used
- Returns:
- the object found
- Throws:
java.lang.Exception
- See Also:
ObjectFactory.getObjectInstance(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable)
setUser
public void setUser(java.lang.String user)
setPassword
public void setPassword(java.lang.String password)
setProperties
public void setProperties(java.util.Properties properties)
Copyright © 1995-2010 Mort Bay Consulting. All Rights Reserved.