org.mortbay.naming.factories
Class MailSessionReference
java.lang.Object
javax.naming.Reference
org.mortbay.naming.factories.MailSessionReference
- All Implemented Interfaces:
- Serializable, Cloneable, ObjectFactory
public class MailSessionReference
- extends Reference
- implements 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
Methods inherited from class javax.naming.Reference |
add, add, clear, clone, equals, get, get, getAll, getClassName, getFactoryClassLocation, getFactoryClassName, hashCode, remove, size, toString |
MailSessionReference
public MailSessionReference()
getObjectInstance
public Object getObjectInstance(Object ref,
Name arg1,
Context arg2,
Hashtable arg3)
throws Exception
- Create a javax.mail.Session instance based on the information passed in the Reference
- Specified by:
getObjectInstance
in interface ObjectFactory
- Parameters:
ref
- the Referencearg1
- not usedarg2
- not usedarg3
- not used
- Returns:
-
- Throws:
Exception
- See Also:
ObjectFactory.getObjectInstance(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable)
setUser
public void setUser(String user)
setPassword
public void setPassword(String password)
setProperties
public void setProperties(Properties properties)
Copyright © 1995-2009 Mort Bay Consulting. All Rights Reserved.