Package 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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MailSessionReference.PasswordAuthenticator
-
Constructor Summary
Constructors Constructor Description MailSessionReference()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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 Referencevoid
setPassword(java.lang.String password)
void
setProperties(java.util.Properties properties)
void
setUser(java.lang.String user)
-
-
-
Method Detail
-
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 interfacejavax.naming.spi.ObjectFactory
- Parameters:
ref
- the Referencearg1
- not usedarg2
- not usedarg3
- not used- Returns:
- the object found
- Throws:
java.lang.Exception
- if unable to get object instance- 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)
-
-