MailSessionReference (Jetty :: Aggregate :: All core Jetty 7.6.8.v20121106 API)
Date: 2012-11-06

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

      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

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `MailSessionReference.PasswordAuthenticator`

  - ### Field Summary

    - ### Fields inherited from class javax.naming.Reference

      `addrs, classFactory, classFactoryLocation, className`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MailSessionReference()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `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

    - #### MailSessionReference

          public MailSessionReference()

  - ### Method Detail

    - #### 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 Reference
        `arg1` - not used
        `arg2` - not used
        `arg3` - not used
      Returns:
        the object found
      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-2012 Mort Bay Consulting. All Rights Reserved.