Class MailSessionReference
java.lang.Object
javax.naming.Reference
org.eclipse.jetty.ee10.jndi.factories.MailSessionReference
- All Implemented Interfaces:
Serializable
,Cloneable
,ObjectFactory
MailSessionReference
This is a subclass of jakarta.mail.Reference and an ObjectFactory for jakarta.mail.Session objects.
The subclassing of Reference allows all of the setup for a jakarta.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 jakarta.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 jakarta.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 jakarta.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
-