|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.mx.util.JBossNotificationBroadcasterSupport org.jboss.system.ServiceMBeanSupport org.jboss.portal.jems.as.system.AbstractJBossService org.jboss.portal.core.modules.AbstractModule org.jboss.portal.core.impl.mail.MailModuleImpl
Nested Class Summary | |
private static class |
MailModuleImpl.MailAuthenticator
Used for sending through a gateway needing authentication |
private class |
MailModuleImpl.MyMessage
Encapsulate a message in this class with a serial id version to keep track. |
Field Summary | |
private int |
currentSerialId
A serial id used to track messages locally. |
private EDU.oswego.cs.dl.util.concurrent.QueuedExecutor |
executor
The thread that will send the mail. |
java.lang.String |
gateway
The SMTP gateway through which mail will be delivered. |
private boolean |
javaMailDebugEnabled
True if javamail debug is enabled. |
private org.apache.log4j.Logger |
log
|
private org.jboss.logging.util.LoggerStream |
logs
The PrintStream java mail debug output is sent to. |
private java.util.Properties |
properties
Javamail properties. |
private EDU.oswego.cs.dl.util.concurrent.Channel |
queue
The queue that will held all the messages. |
private int |
queueCapacity
Queue max capacity or -1 if unbounded. |
private MailModuleImpl.MailAuthenticator |
smtpAuth
The Authenticator implementation used when stmp auth is needed. |
private int |
SMTPConnectionTimeout
SMTP connection timeout. |
private java.lang.String |
smtpPassword
The password for authenticating to the smtp gateway. |
private int |
SMTPTimeout
SMTP timeout. |
private java.lang.String |
smtpUser
The username for authenticating to the smtp gateway. |
Fields inherited from class org.jboss.portal.core.modules.AbstractModule |
jndiName |
Fields inherited from class org.jboss.system.ServiceMBeanSupport |
server, SERVICE_CONTROLLER_SIG, serviceName |
Fields inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport |
|
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 | |
MailModuleImpl()
Creates a new MailModuleImpl object. |
Method Summary | |
boolean |
deliver(int serialId,
java.lang.String from,
java.lang.String to,
java.lang.String subject,
java.lang.String body)
|
private boolean |
deliver(int serialId,
java.lang.String host,
java.lang.String from,
java.lang.String to,
java.lang.String subject,
java.lang.String body)
|
int |
flushQueue()
|
int |
getCurrentSerialId()
|
java.lang.String |
getGateway()
|
boolean |
getJavaMailDebugEnabled()
|
int |
getQueueCapacity()
|
int |
getQueueSize()
|
int |
getSMTPConnectionTimeout()
|
java.lang.String |
getSmtpPassword()
|
int |
getSMTPTimeout()
|
java.lang.String |
getSmtpUser()
|
java.lang.String |
listProperties()
|
void |
send(java.lang.String from,
java.lang.String to,
java.lang.String subject,
java.lang.String body)
|
void |
setGateway(java.lang.String gateway)
|
void |
setJavaMailDebugEnabled(boolean javaMailDebugEnabled)
|
void |
setQueueCapacity(int queueCapacity)
|
void |
setSMTPConnectionTimeout(int SMTPConnectionTimeout)
|
void |
setSmtpPassword(java.lang.String smtpPassword)
|
void |
setSMTPTimeout(int SMTPTimeout)
|
void |
setSmtpUser(java.lang.String smtpUser)
|
protected void |
startService()
|
protected void |
stopService()
|
Methods inherited from class org.jboss.portal.core.modules.AbstractModule |
getJNDIName, setJNDIName |
Methods inherited from class org.jboss.portal.jems.as.system.AbstractJBossService |
create, destroy, getState, getStateString, start, stop |
Methods inherited from class org.jboss.system.ServiceMBeanSupport |
createService, destroyService, getDeploymentInfo, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister |
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport |
addNotificationListener, getNotificationInfo, handleNotification, nextNotificationSequenceNumber, removeNotificationListener, removeNotificationListener, sendNotification |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private final org.apache.log4j.Logger log
private java.util.Properties properties
private int queueCapacity
private EDU.oswego.cs.dl.util.concurrent.QueuedExecutor executor
private EDU.oswego.cs.dl.util.concurrent.Channel queue
public java.lang.String gateway
private java.lang.String smtpUser
private java.lang.String smtpPassword
private MailModuleImpl.MailAuthenticator smtpAuth
private boolean javaMailDebugEnabled
private int SMTPConnectionTimeout
private int SMTPTimeout
private org.jboss.logging.util.LoggerStream logs
private int currentSerialId
Constructor Detail |
public MailModuleImpl()
MailModuleImpl
object.
Method Detail |
public int getSMTPConnectionTimeout()
public void setSMTPConnectionTimeout(int SMTPConnectionTimeout)
setSMTPConnectionTimeout
in interface MailModule
public int getSMTPTimeout()
public void setSMTPTimeout(int SMTPTimeout)
setSMTPTimeout
in interface MailModule
public int getCurrentSerialId()
public java.lang.String getGateway()
public void setGateway(java.lang.String gateway)
setGateway
in interface MailModule
public java.lang.String getSmtpUser()
public void setSmtpUser(java.lang.String smtpUser)
setSmtpUser
in interface MailModule
public java.lang.String getSmtpPassword()
public void setSmtpPassword(java.lang.String smtpPassword)
setSmtpPassword
in interface MailModule
public int getQueueSize()
public java.lang.String listProperties()
public int flushQueue()
public int getQueueCapacity()
public void setQueueCapacity(int queueCapacity)
public boolean getJavaMailDebugEnabled()
public void setJavaMailDebugEnabled(boolean javaMailDebugEnabled)
setJavaMailDebugEnabled
in interface MailModule
public void send(java.lang.String from, java.lang.String to, java.lang.String subject, java.lang.String body)
send
in interface MailModule
protected void startService() throws java.lang.Exception
startService
in class AbstractModule
java.lang.Exception
protected void stopService() throws java.lang.Exception
stopService
in class AbstractModule
java.lang.Exception
public boolean deliver(int serialId, java.lang.String from, java.lang.String to, java.lang.String subject, java.lang.String body)
private boolean deliver(int serialId, java.lang.String host, java.lang.String from, java.lang.String to, java.lang.String subject, java.lang.String body) throws javax.mail.internet.AddressException, java.security.NoSuchProviderException, javax.mail.MessagingException
javax.mail.internet.AddressException
java.security.NoSuchProviderException
javax.mail.MessagingException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |