站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 varia API Documentation 英文版文档

MailService (Various API) - JBoss 4.0.1 sp1 varia API Documentation 英文版文档


org.jboss.mail
Class MailService

java.lang.Object
  extended byorg.jboss.mx.util.JBossNotificationBroadcasterSupport
      extended byorg.jboss.system.ServiceMBeanSupport
          extended byorg.jboss.mail.MailService
All Implemented Interfaces:
MailServiceMBean, javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, org.jboss.system.Service, org.jboss.system.ServiceMBean

public class MailService
extends org.jboss.system.ServiceMBeanSupport
implements MailServiceMBean

MBean that gives support for JavaMail. Object of class javax.mail.Session will be bound in JNDI with the name provided with method setJNDIName(java.lang.String).

Version:
$Revision: 1.14 $
Author:
Simone Bordet, Jason Dillon, Scott.Stark@jboss.org

Field Summary
static String JNDI_NAME
           
 
Fields inherited from class org.jboss.system.ServiceMBeanSupport
log, server, SERVICE_CONTROLLER_SIG, serviceName
 
Fields inherited from interface org.jboss.mail.MailServiceMBean
OBJECT_NAME
 
Fields inherited from interface org.jboss.system.ServiceMBean
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED
 
Constructor Summary
MailService()
           
 
Method Summary
 Element getConfiguration()
          Configuration for the mail service.
 String getDefaultSender()
           
 String getJNDIName()
           
protected  javax.management.ObjectName getObjectName(javax.management.MBeanServer server, javax.management.ObjectName name)
           
protected  String getPassword()
          Password is write only.
 String getPOP3SererHost()
           
protected  Properties getProperties()
           
 String getSMTPServerHost()
           
 String getStoreProtocol()
           
 String getTransportProtocol()
           
 String getUser()
           
 void setConfiguration(Element element)
          Configuration for the mail service.
 void setJNDIName(String name)
          The JNDI name under which javax.mail.Session objects are bound.
 void setPassword(String password)
          Password used to connect to a mail server
 void setUser(String user)
          User id used to connect to a mail server
protected  void startService()
           
protected  void stopService()
           
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport
create, createService, destroy, destroyService, getLog, getName, getNextNotificationSequenceNumber, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister, start, stop
 
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.system.ServiceMBean
getName, getState, getStateString, jbossInternalLifecycle
 
Methods inherited from interface org.jboss.system.Service
create, destroy, start, stop
 

Field Detail

JNDI_NAME

public static final String JNDI_NAME
See Also:
Constant Field Values
Constructor Detail

MailService

public MailService()
Method Detail

setUser

public void setUser(String user)
User id used to connect to a mail server

Specified by:
setUser in interface MailServiceMBean
See Also:
setPassword(java.lang.String)

getUser

public String getUser()
Specified by:
getUser in interface MailServiceMBean

setPassword

public void setPassword(String password)
Password used to connect to a mail server

Specified by:
setPassword in interface MailServiceMBean
See Also:
setUser(java.lang.String)

getPassword

protected String getPassword()
Password is write only.


getConfiguration

public Element getConfiguration()
Configuration for the mail service.

Specified by:
getConfiguration in interface MailServiceMBean

setConfiguration

public void setConfiguration(Element element)
Configuration for the mail service.

Specified by:
setConfiguration in interface MailServiceMBean

setJNDIName

public void setJNDIName(String name)
The JNDI name under which javax.mail.Session objects are bound.

Specified by:
setJNDIName in interface MailServiceMBean

getJNDIName

public String getJNDIName()
Specified by:
getJNDIName in interface MailServiceMBean

getStoreProtocol

public String getStoreProtocol()
Specified by:
getStoreProtocol in interface MailServiceMBean

getTransportProtocol

public String getTransportProtocol()
Specified by:
getTransportProtocol in interface MailServiceMBean

getDefaultSender

public String getDefaultSender()
Specified by:
getDefaultSender in interface MailServiceMBean

getSMTPServerHost

public String getSMTPServerHost()
Specified by:
getSMTPServerHost in interface MailServiceMBean

getPOP3SererHost

public String getPOP3SererHost()
Specified by:
getPOP3SererHost in interface MailServiceMBean

getObjectName

protected javax.management.ObjectName getObjectName(javax.management.MBeanServer server,
                                                    javax.management.ObjectName name)
                                             throws javax.management.MalformedObjectNameException
Throws:
javax.management.MalformedObjectNameException

startService

protected void startService()
                     throws Exception
Throws:
Exception

getProperties

protected Properties getProperties()
                            throws Exception
Throws:
Exception

stopService

protected void stopService()
                    throws Exception
Throws:
Exception


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.