|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.geronimo.mail.ProtocolGBean org.apache.geronimo.mail.SMTPTransportGBean
public class SMTPTransportGBean
A GBean that provides for the configuration of a JavaMail SMTP transport protocol.
SMTP transport properties that are common to all SMTP transports are provided via member variables of this class. Values that are set in the individual member variables will override any of the corresponding values that have been set in the properties set.
MailGBean
Field Summary | |
---|---|
static String |
GBEAN_8BITMIME
|
static String |
GBEAN_DSN_NOTIFY
|
static String |
GBEAN_DSN_RET
|
static String |
GBEAN_EHLO
|
static GBeanInfo |
GBEAN_INFO
|
static String |
GBEAN_MAIL_EXTENSION
|
static String |
GBEAN_REPORT_SUCCESS
|
static String |
GBEAN_SEND_PARTIAL
|
static String |
GBEAN_STARTTLS_ENABLE
|
static String |
GBEAN_SUBMITTER
|
static String |
SMTP_8BITMIME
|
static String |
SMTP_AUTH
|
static String |
SMTP_CONNECTION_TIMEOUT
|
static String |
SMTP_DSN_NOTIFY
|
static String |
SMTP_DSN_RET
|
static String |
SMTP_EHLO
|
static String |
SMTP_FACTORY_CLASS
|
static String |
SMTP_FACTORY_FALLBACK
|
static String |
SMTP_FACTORY_PORT
|
static String |
SMTP_FROM
|
static String |
SMTP_LOCALADDRESS
|
static String |
SMTP_LOCALHOST
|
static String |
SMTP_LOCALPORT
|
static String |
SMTP_MAIL_EXTENSION
|
static String |
SMTP_PORT
|
static String |
SMTP_QUITWAIT
|
static String |
SMTP_REALM
|
static String |
SMTP_REPORT_SUCCESS
|
static String |
SMTP_SEND_PARTIAL
|
static String |
SMTP_STARTTLS_ENABLE
|
static String |
SMTP_SUBMITTER
|
static String |
SMTP_TIMEOUT
|
Fields inherited from class org.apache.geronimo.mail.ProtocolGBean |
---|
GBEAN_ADD_OVERRIDES, GBEAN_AUTH, GBEAN_CONNECTION_TIMEOUT, GBEAN_FACTORY_CLASS, GBEAN_FACTORY_FALLBACK, GBEAN_FACTORY_PORT, GBEAN_FROM, GBEAN_HOST, GBEAN_LOCALADDRESS, GBEAN_LOCALHOST, GBEAN_LOCALPORT, GBEAN_OBJECTNAME, GBEAN_PORT, GBEAN_PROPERTIES, GBEAN_PROTOCOL, GBEAN_QUITWAIT, GBEAN_REALM, GBEAN_TIMEOUT, GBEAN_USER |
Constructor Summary | |
---|---|
SMTPTransportGBean(String objectName,
Properties properties,
String host,
String user,
Integer port,
Integer connectionTimeout,
Integer timeout,
String from,
String localhost,
String localaddress,
Integer localport,
Boolean ehlo,
Boolean auth,
Boolean startTLSEnable,
String submitter,
String dsnNotify,
String dsnRet,
Boolean allow8bitmime,
Boolean sendPartial,
String saslRealm,
Boolean quitWait,
Boolean reportSuccess,
String socketFactoryClass,
Boolean socketFactoryFallback,
Integer socketFactoryPort,
String mailExtension)
Construct an instance of SMTPTransportGBean Values that are set in the individual member variables will override any of the corresponding values that have been set in the properties set. |
Method Summary | |
---|---|
void |
addOverrides(Properties props)
Add the overrides from the member variables to the properties file. |
void |
doFail()
Fails the GBean. |
void |
doStart()
Starts the GBean. |
void |
doStop()
Stops the target. |
Boolean |
getAllow8bitmime()
Returns whether encodings are converted to use "8bit" under certain conditions. |
Boolean |
getAuth()
Returns whether an attempt will be made to authenticate the user using the AUTH command. |
Integer |
getConnectionTimeout()
Returns the socket connection timeout value in milliseconds. |
String |
getDsnNotify()
Returns the NOTIFY option to the RCPT command. |
String |
getDsnRet()
Returns the RET option to the MAIL command. |
Boolean |
getEhlo()
Returns whether an attempt will be made to sign on with the EHLO command. |
String |
getFrom()
Returns the email address to use for SMTP MAIL command. |
static GBeanInfo |
getGBeanInfo()
|
String |
getLocaladdress()
Returns the local address (host name) to bind to when creating the SMTP socket. |
String |
getLocalhost()
Returns the local host name used in the SMTP HELO or EHLO command. |
Integer |
getLocalport()
Returns the local port number to bind to when creating the SMTP socket. |
String |
getMailExtension()
Returns the extension string to append to the MAIL command. |
Integer |
getPort()
Returns the SMTP server port to connect to, if the connect() method doesn't explicitly specify one. |
Boolean |
getQuitWait()
Returns whether the transport will wait for the response to the QUIT command. |
Boolean |
getReportSuccess()
Returns whether the transport will include an SMTPAddressSucceededException for each address that is successful. |
String |
getSaslRealm()
Returns the realm to use with DIGEST-MD5 authentication. |
Boolean |
getSendPartial()
Returns whether to send email to valid addresses when others are invalid. |
String |
getSocketFactoryClass()
Returns the class that will be used to create SMTP sockets. |
Boolean |
getSocketFactoryFallback()
Returns whether java.net.Socket class will be created if the specified socket factory class cannot be created. |
Integer |
getSocketFactoryPort()
Returns the port to connect to when using the specified socket factory. |
Boolean |
getStartTLSEnable()
Returns the flag that enables the use of the STARTTLS command (if supported by the server) to switch the connection to a TLS-protected connection before issuing any login commands. |
String |
getSubmitter()
Returns the submitter to use in the AUTH tag in the MAIL FROM command. |
Integer |
getTimeout()
Returns the socket I/O timeout value in milliseconds. |
void |
setAllow8bitmime(Boolean allow8bitmime)
Sets whether encodings are converted to use "8bit" under certain conditions. |
void |
setAuth(Boolean auth)
Sets whether an attempt will be made to authenticate the user using the AUTH command. |
void |
setConnectionTimeout(Integer connectionTimeout)
Sets the socket connection timeout value in milliseconds. |
void |
setDsnNotify(String dsnNotify)
Sets the NOTIFY option to the RCPT command Either NEVER, or some combination of SUCCESS, FAILURE, and DELAY (separated by commas). |
void |
setDsnRet(String dsnRet)
Sets the RET option to the MAIL command Either FULL or HDRS. |
void |
setEhlo(Boolean ehlo)
Set whether an attempt will be made to sign on with the EHLO command. |
void |
setFrom(String from)
Sets the email address to use for SMTP MAIL command Email address to use for SMTP MAIL command. |
void |
setLocaladdress(String localaddress)
Sets the local address (host name) to bind to when creating the SMTP socket. |
void |
setLocalhost(String localhost)
Sets the local host name used in the SMTP HELO or EHLO command. |
void |
setLocalport(Integer localport)
Sets the local port number to bind to when creating the SMTP socket. |
void |
setMailExtension(String mailExtension)
Sets the extension string to append to the MAIL command. |
void |
setPort(Integer port)
Sets the SMTP server port to connect to, if the connect() method doesn't explicitly specify one. |
void |
setQuitWait(Boolean quitWait)
Sets whether the transport will wait for the response to the QUIT command If set to true, causes the transport to wait for the response to the QUIT command. |
void |
setReportSuccess(Boolean reportSuccess)
Sets whether the transport will include an SMTPAddressSucceededException for each address that is successful. |
void |
setSaslRealm(String saslRealm)
Sets the realm to use with DIGEST-MD5 authentication. |
void |
setSendPartial(Boolean sendPartial)
Sets whether to send email to valid addresses when others are invalid. |
void |
setSocketFactoryClass(String socketFactoryClass)
Sets the class that will be used to create SMTP sockets. |
void |
setSocketFactoryFallback(Boolean socketFactoryFallback)
Sets whether java.net.Socket class will be created if the specified socket factory class cannot be created. |
void |
setSocketFactoryPort(Integer socketFactoryPort)
Sets the port to connect to when using the specified socket factory. |
void |
setStartTLSEnable(Boolean startTLSEnable)
Sets the flag that enables the use of the STARTTLS command (if supported by the server) to switch the connection to a TLS-protected connection before issuing any login commands. |
void |
setSubmitter(String submitter)
Sets the submitter to use in the AUTH tag in the MAIL FROM command. |
void |
setTimeout(Integer timeout)
Sets the socket I/O timeout value in milliseconds. |
Methods inherited from class org.apache.geronimo.mail.ProtocolGBean |
---|
getHost, getObjectName, getProperties, getProtocol, getUser, setHost, setProperties, setUser |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String SMTP_PORT
public static final String SMTP_CONNECTION_TIMEOUT
public static final String SMTP_TIMEOUT
public static final String SMTP_FROM
public static final String SMTP_AUTH
public static final String SMTP_REALM
public static final String SMTP_QUITWAIT
public static final String SMTP_FACTORY_CLASS
public static final String SMTP_FACTORY_FALLBACK
public static final String SMTP_FACTORY_PORT
public static final String SMTP_LOCALHOST
public static final String SMTP_LOCALADDRESS
public static final String SMTP_LOCALPORT
public static final String SMTP_EHLO
public static final String SMTP_SUBMITTER
public static final String SMTP_DSN_NOTIFY
public static final String SMTP_DSN_RET
public static final String SMTP_8BITMIME
public static final String SMTP_SEND_PARTIAL
public static final String SMTP_REPORT_SUCCESS
public static final String SMTP_MAIL_EXTENSION
public static final String SMTP_STARTTLS_ENABLE
public static final String GBEAN_EHLO
public static final String GBEAN_SUBMITTER
public static final String GBEAN_DSN_NOTIFY
public static final String GBEAN_DSN_RET
public static final String GBEAN_8BITMIME
public static final String GBEAN_SEND_PARTIAL
public static final String GBEAN_REPORT_SUCCESS
public static final String GBEAN_MAIL_EXTENSION
public static final String GBEAN_STARTTLS_ENABLE
public static final GBeanInfo GBEAN_INFO
Constructor Detail |
---|
public SMTPTransportGBean(String objectName, Properties properties, String host, String user, Integer port, Integer connectionTimeout, Integer timeout, String from, String localhost, String localaddress, Integer localport, Boolean ehlo, Boolean auth, Boolean startTLSEnable, String submitter, String dsnNotify, String dsnRet, Boolean allow8bitmime, Boolean sendPartial, String saslRealm, Boolean quitWait, Boolean reportSuccess, String socketFactoryClass, Boolean socketFactoryFallback, Integer socketFactoryPort, String mailExtension)
objectName
- the object name of the protocolproperties
- the set of default properties for the protocolhost
- the host the protocol connects touser
- the default name for the protocolport
- the SMTP server portconnectionTimeout
- the socket connection timeout value in millisecondstimeout
- the socket I/O timeout value in millisecondsfrom
- the email address to use for SMTP MAIL commandlocalhost
- the local host name used in the SMTP HELO or EHLO commandlocaladdress
- the local address (host name) to bind to when creating the SMTP socketlocalport
- the local port number to bind to when creating the SMTP socketehlo
- whether an attempt will be made to sign on with the EHLO commandauth
- whether an attempt will be made to authenticate the user using
the AUTH commandstartTLSEnable
- the flag that enables the use of the STARTTLS command (if supported by the server) to switch the connection to a TLS-protected connection before issuing any login commandssubmitter
- the submitter to use in the AUTH tag in the MAIL FROM commanddsnNotify
- the NOTIFY option to the RCPT commanddsnRet
- the RET option to the MAIL commandallow8bitmime
- whether encodings are converted to use "8bit" under certain
conditionssendPartial
- whether to send email to valid addresses when others are invalidsaslRealm
- the realm to use with DIGEST-MD5 authenticationquitWait
- whether the transport will wait for the response to the QUIT commandreportSuccess
- whether the transport will include an SMTPAddressSucceededException
for each address that is successfulsocketFactoryClass
- the class that will be used to create SMTP socketssocketFactoryFallback
- whether java.net.Socket class will be created if the specified
socket factory class cannot be createdsocketFactoryPort
- whether java.net.Socket class will be created if the specified
socket factory class cannot be createdmailExtension
- the extension string to append to the MAIL commandMethod Detail |
---|
public Integer getPort()
public void setPort(Integer port)
port
- the SMTP server port to connect topublic Integer getConnectionTimeout()
public void setConnectionTimeout(Integer connectionTimeout)
connectionTimeout
- the socket connection timeout value in milliseconds.public Integer getTimeout()
public void setTimeout(Integer timeout)
timeout
- the socket I/O timeout value in millisecondspublic String getFrom()
public void setFrom(String from)
from
- the email address to use for SMTP MAIL commandpublic String getLocalhost()
public void setLocalhost(String localhost)
localhost
- the local host name used in the SMTP HELO or EHLO commandpublic String getLocaladdress()
public void setLocaladdress(String localaddress)
localaddress
- the local address (host name) to bind to when creating the SMTP socketpublic Integer getLocalport()
public void setLocalport(Integer localport)
localport
- the local port number to bind to when creating the SMTP socketpublic Boolean getEhlo()
public void setEhlo(Boolean ehlo)
ehlo
- whether an attempt will be made to sign on with the EHLO commandpublic Boolean getAuth()
public void setAuth(Boolean auth)
auth
- whether an attempt will be made to authenticate the user using
the AUTH command.public Boolean getStartTLSEnable()
public void setStartTLSEnable(Boolean startTLSEnable)
startTLSEnable
- the flag that enables the use of the STARTTLS command (if
supported by the server) to switch the connection to a TLS-protected
connection before issuing any login commandspublic String getSubmitter()
public void setSubmitter(String submitter)
submitter
- the submitter to use in the AUTH tag in the MAIL FROM commandpublic String getDsnNotify()
public void setDsnNotify(String dsnNotify)
dsnNotify
- the NOTIFY option to the RCPT commandpublic String getDsnRet()
public void setDsnRet(String dsnRet)
dsnRet
- the RET option to the MAIL commandpublic Boolean getAllow8bitmime()
public void setAllow8bitmime(Boolean allow8bitmime)
allow8bitmime
- whether encodings are converted to use "8bit" under certain
conditionspublic Boolean getSendPartial()
public void setSendPartial(Boolean sendPartial)
sendPartial
- whether to send email to valid addresses when others are invalidpublic String getSaslRealm()
public void setSaslRealm(String saslRealm)
saslRealm
- the realm to use with DIGEST-MD5 authenticationpublic Boolean getQuitWait()
public void setQuitWait(Boolean quitWait)
quitWait
- whether the transport will wait for the response to the QUIT commandpublic Boolean getReportSuccess()
public void setReportSuccess(Boolean reportSuccess)
reportSuccess
- whether the transport will include an SMTPAddressSucceededException
for each address that is successfulpublic String getSocketFactoryClass()
public void setSocketFactoryClass(String socketFactoryClass)
socketFactoryClass
- the class that will be used to create SMTP socketspublic Boolean getSocketFactoryFallback()
public void setSocketFactoryFallback(Boolean socketFactoryFallback)
socketFactoryFallback
- whether java.net.Socket class will be created if the specified
socket factory class cannot be createdpublic Integer getSocketFactoryPort()
public void setSocketFactoryPort(Integer socketFactoryPort)
socketFactoryPort
- the port to connect to when using the specified socket factorypublic String getMailExtension()
public void setMailExtension(String mailExtension)
mailExtension
- the extension string to append to the MAIL commandpublic void addOverrides(Properties props)
addOverrides
in class ProtocolGBean
public void doStart() throws Exception
GBeanLifecycle
doStart
in interface GBeanLifecycle
doStart
in class ProtocolGBean
Exception
- if the target failed to start; this will cause a transition to the failed statepublic void doStop() throws Exception
GBeanLifecycle
doStop
in interface GBeanLifecycle
doStop
in class ProtocolGBean
Exception
- if the target failed to stop; this will cause a transition to the failed statepublic void doFail()
GBeanLifecycle
doFail
in interface GBeanLifecycle
doFail
in class ProtocolGBean
public static GBeanInfo getGBeanInfo()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |