org.objectweb.jonas.mail.factory
Class JavaMailResource

java.lang.Object
  extended by javax.management.NotificationBroadcasterSupport
      extended by org.objectweb.jonas.management.ReconfigDispatcher
          extended by org.objectweb.jonas.management.j2eemanagement.J2EEManagedObject
              extended by org.objectweb.jonas.management.j2eemanagement.J2EEResource
                  extended by org.objectweb.jonas.mail.factory.JavaMailResource
All Implemented Interfaces:
javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, ReconfigDispatcherMBean
Direct Known Subclasses:
JavaMailMimePartDSResource, JavaMailSessionResource

public abstract class JavaMailResource
extends J2EEResource

Author:
Adriana Danes JavaMail resource implementation.

Field Summary
 
Fields inherited from class org.objectweb.jonas.management.j2eemanagement.J2EEManagedObject
J2EE_TYPE_APPLICATION, J2EE_TYPE_SERVER, NAME
 
Fields inherited from class org.objectweb.jonas.management.ReconfigDispatcher
RECONFIG_TYPE, SAVE_RECONFIG_TYPE
 
Constructor Summary
JavaMailResource(java.lang.String objectName, boolean stateManageable, boolean statisticsProvider, boolean eventProvider, JavaMail mailFactory)
          JavaMail resource constructor.
 
Method Summary
 java.util.Properties getAuthenticationProperties()
          Get the authentication properties.
 java.lang.String getFactoryName()
          Get the name of the factory.
 java.lang.String getFactoryType()
          Get the type of the factory.
 java.lang.String getName()
          Get the name of the factory.
protected abstract  long getSequenceNumber()
          Gets the sequence number for MBeans operations
 java.util.Properties getSessionProperties()
          Get the session properties.
protected  void notifyReconfiguration(java.util.Properties props)
           
 void saveConfig()
          Save updated configuration
 void setAuthenticationProperties(java.util.Properties props)
          Set the authentication properties.
 void setName(java.lang.String name)
          Set the name of the factory.
 void setSessionProperties(java.util.Properties props)
          Set the session properties.
 
Methods inherited from class org.objectweb.jonas.management.j2eemanagement.J2EEManagedObject
getObjectName, isEventProvider, isStateManageable, isStatisticsProvider
 
Methods inherited from class org.objectweb.jonas.management.ReconfigDispatcher
addNotificationListener, getFilter, getHandback, getListener, getNotificationInfo, initLogger, removeNotificationListener, sendReconfigNotification, sendSaveNotification
 
Methods inherited from class javax.management.NotificationBroadcasterSupport
handleNotification, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaMailResource

public JavaMailResource(java.lang.String objectName,
                        boolean stateManageable,
                        boolean statisticsProvider,
                        boolean eventProvider,
                        JavaMail mailFactory)
JavaMail resource constructor.

Parameters:
objectName - MBean ObjectName
stateManageable -
statisticsProvider -
eventProvider -
mailFactory -
Method Detail

getFactoryName

public java.lang.String getFactoryName()
Get the name of the factory.

Returns:
the name of the mail factory (the resource name as defined in jonas.properties)

getName

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

Returns:
name of the mail factory.

setName

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

Parameters:
name - name of the mail factory.

getFactoryType

public java.lang.String getFactoryType()
Get the type of the factory.

Returns:
type of the mail factory.

getAuthenticationProperties

public java.util.Properties getAuthenticationProperties()
Get the authentication properties.

Returns:
properties of the authentication.

setAuthenticationProperties

public void setAuthenticationProperties(java.util.Properties props)
Set the authentication properties.

Parameters:
props - the authentication properties.

getSessionProperties

public java.util.Properties getSessionProperties()
Get the session properties.

Returns:
the properties of Session.

setSessionProperties

public void setSessionProperties(java.util.Properties props)
Set the session properties.

Parameters:
props - the Session properties.

saveConfig

public void saveConfig()
Save updated configuration


getSequenceNumber

protected abstract long getSequenceNumber()
Gets the sequence number for MBeans operations

Returns:
the sequence number for MBeans operations

notifyReconfiguration

protected void notifyReconfiguration(java.util.Properties props)