Class MailSessionReference

  extended by javax.naming.Reference
      extended by org.eclipse.jetty.jndi.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

Nested Class Summary
static class MailSessionReference.PasswordAuthenticator
Field Summary
Fields inherited from class javax.naming.Reference
addrs, classFactory, classFactoryLocation, className
Constructor Summary
Method Summary
 Object getObjectInstance(Object ref, Name arg1, Context arg2, Hashtable arg3)
          Create a javax.mail.Session instance based on the information passed in the Reference
 void setPassword(String password)
 void setProperties(Properties properties)
 void setUser(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

Constructor Detail


public MailSessionReference()
Method Detail


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
ref - the Reference
arg1 - not used
arg2 - not used
arg3 - not used
the object found
See Also:
ObjectFactory.getObjectInstance(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable)


public void setUser(String user)


public void setPassword(String password)


public void setProperties(Properties properties)

Copyright © 1995-2011 Mort Bay Consulting. All Rights Reserved.