org.ow2.easybeans.component.mail.factory
Class AbsJavaMailRef

java.lang.Object
  extended by org.ow2.easybeans.component.mail.factory.AbsJavaMailRef
All Implemented Interfaces:
javax.naming.Referenceable
Direct Known Subclasses:
JavaMailMimePartDataSourceRef, JavaMailSessionRef

public abstract class AbsJavaMailRef
extends java.lang.Object
implements javax.naming.Referenceable

Abstract referenceable object used to bind JavaMail factories.

Author:
Florent BENOIT

Constructor Summary
AbsJavaMailRef()
          Build a new javamail reference.
 
Method Summary
 java.lang.String getAuthName()
           
 java.lang.String getAuthPass()
           
 java.lang.String getJNDIName()
           
 java.lang.String getName()
           
 java.util.Properties getProperties()
           
abstract  javax.naming.Reference getReference()
          Retrieves the Reference of this object.
abstract  java.lang.String getType()
          Return the type of the factory.
 void putObject(javax.naming.Reference reference, java.lang.String propertyName, java.io.Serializable o)
          Put the given object in the reference with the given property name.
 void setAuthName(java.lang.String authName)
          Set the authentication name of this factory.
 void setAuthPass(java.lang.String authPass)
          Set the authentication password of this factory.
 void setJNDIName(java.lang.String jndiName)
          Set the JNDI name of this factory.
 void setName(java.lang.String name)
          Set the name of this factory.
 void setProperties(java.util.Properties properties)
          Sets the session properties.
protected  void updateRefAddr(javax.naming.Reference reference)
          Adds some settings to the reference.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbsJavaMailRef

public AbsJavaMailRef()
Build a new javamail reference.

Method Detail

getName

public java.lang.String getName()
Returns:
the name of the factory.

setName

public void setName(java.lang.String name)
Set the name of this factory.

Parameters:
name - the name of this factory

getJNDIName

public java.lang.String getJNDIName()
Returns:
the JNDI name of the factory.

setJNDIName

public void setJNDIName(java.lang.String jndiName)
Set the JNDI name of this factory.

Parameters:
jndiName - the JNDI name of this factory

getAuthName

public java.lang.String getAuthName()
Returns:
the authentication name of the factory.

setAuthName

public void setAuthName(java.lang.String authName)
Set the authentication name of this factory.

Parameters:
authName - the authentication name of this factory

getAuthPass

public java.lang.String getAuthPass()
Returns:
the authentication password of the factory.

setAuthPass

public void setAuthPass(java.lang.String authPass)
Set the authentication password of this factory.

Parameters:
authPass - the authentication password of this factory

getProperties

public java.util.Properties getProperties()
Returns:
the properties used by the factory.

setProperties

public void setProperties(java.util.Properties properties)
Sets the session properties.

Parameters:
properties - the session properties.

updateRefAddr

protected void updateRefAddr(javax.naming.Reference reference)
                      throws javax.naming.NamingException
Adds some settings to the reference.

Parameters:
reference - the reference to configure
Throws:
javax.naming.NamingException - if something goes wrong

putObject

public void putObject(javax.naming.Reference reference,
                      java.lang.String propertyName,
                      java.io.Serializable o)
               throws javax.naming.NamingException
Put the given object in the reference with the given property name.

Parameters:
reference - the given reference
propertyName - the given property
o - the object to add
Throws:
javax.naming.NamingException - if object is not put.

getReference

public abstract javax.naming.Reference getReference()
                                             throws javax.naming.NamingException
Retrieves the Reference of this object.

Specified by:
getReference in interface javax.naming.Referenceable
Returns:
The non-null Reference of this object.
Throws:
javax.naming.NamingException - If a naming exception was encountered while retrieving the reference.

getType

public abstract java.lang.String getType()
Return the type of the factory.

Returns:
the type of the mail factory


Copyright © 2006-2009 OW2 Consortium. All Rights Reserved.