当前页面:
在线文档首页 >
JBoss Seam 1.1.7 cr1 API 英文版文档
MailSession (JBoss Seam API Documentation) - JBoss Seam 1.1.7 cr1 API 英文版文档
org.jboss.seam.mail
Class MailSession
java.lang.Object
org.jboss.seam.core.AbstractMutable
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MailSession
public MailSession()
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)
instance
public static javax.mail.Session instance()