Package org.eclipse.jetty.jndi.factories
Class MailSessionReference
java.lang.Object
javax.naming.Reference
org.eclipse.jetty.jndi.factories.MailSessionReference
- All Implemented Interfaces:
Serializable
,Cloneable
,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:
-
Nested Class Summary
-
Field Summary
Fields inherited from class javax.naming.Reference
addrs, classFactory, classFactoryLocation, className
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetObjectInstance
(Object ref, Name arg1, Context arg2, Hashtable arg3) Create a javax.mail.Session instance based on the information passed in the Referencevoid
setPassword
(String password) void
setProperties
(Properties properties) void
-
Constructor Details
-
MailSessionReference
public MailSessionReference()
-
-
Method Details
-
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 interfaceObjectFactory
- Parameters:
ref
- the Referencearg1
- not usedarg2
- not usedarg3
- not used- Returns:
- the object found
- Throws:
Exception
- if unable to get object instance- See Also:
-
setUser
-
setPassword
-
setProperties
-