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

MailSession (JBoss Seam API Documentation) - JBoss Seam 1.2.1 API 英文版文档


org.jboss.seam.mail
Class MailSession

java.lang.Object
  extended by org.jboss.seam.core.AbstractMutable
      extended by org.jboss.seam.mail.MailSession
All Implemented Interfaces:
Serializable, Mutable

@Name(value="org.jboss.seam.mail.mailSession")
@Install(precedence=0,
         classDependencies="javax.mail.Session")
@Scope(value=APPLICATION)
@Intercept(value=NEVER)
public class MailSession
extends AbstractMutable
implements Serializable

Manager component for a javax.mail.Session

See Also:
Serialized Form

Constructor Summary
MailSession()
           
 
Method Summary
 void create()
          Initialise mail session Unless disabled, if a mail Session can be found in JNDI, then just manage be a simple wrapper; otherwise configure the session as specified in components.xml
 String getHost()
           
 String getPassword()
           
 Integer getPort()
           
 javax.mail.Session getSession()
           
 String getSessionJndiName()
           
 String getUsername()
           
static javax.mail.Session instance()
           
 boolean isDebug()
           
 boolean isSsl()
           
 void setDebug(boolean debug)
           
 void setHost(String host)
           
 void setPassword(String password)
           
 void setPort(Integer port)
           
 void setSessionJndiName(String jndiName)
           
 void setSsl(boolean ssl)
           
 void setUsername(String username)
           
 
Methods inherited from class org.jboss.seam.core.AbstractMutable
clearDirty, setDirty, setDirty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MailSession

public MailSession()
Method Detail

getSession

@Unwrap
public javax.mail.Session getSession()
                              throws NamingException
Throws:
NamingException

create

@Create
public void create()
Initialise mail session Unless disabled, if a mail Session can be found in JNDI, then just manage be a simple wrapper; otherwise configure the session as specified in components.xml


getPassword

public String getPassword()

setPassword

public void setPassword(String password)
Parameters:
password - The password to use to authenticate to the sending server. If no authentication is required it should be left empty. Must be supplied in conjunction with username.

getUsername

public String getUsername()

setUsername

public void setUsername(String username)
Parameters:
username - The username to use to authenticate to the server. If not set then no authentication is used. Must be set in conjunction with password.

isDebug

public boolean isDebug()

setDebug

public void setDebug(boolean debug)
Parameters:
debug - Whether to display debug message logging. Warning, very verbose.

getHost

public String getHost()

setHost

public void setHost(String host)
Parameters:
host - The host to connect to. Used unless overriden by a protocol specific host

setPort

public void setPort(Integer port)

getPort

public Integer getPort()

getSessionJndiName

public String getSessionJndiName()

setSessionJndiName

public void setSessionJndiName(String jndiName)

isSsl

public boolean isSsl()

setSsl

public void setSsl(boolean ssl)

instance

public static javax.mail.Session instance()