public class AlfrescoJavaMailSender
extends org.springframework.mail.javamail.JavaMailSenderImpl
JavaMailSenderImpl
to pool the Transport
s used to send emails.
This is to overcome problems reported in CLOUD-313.Constructor and Description |
---|
AlfrescoJavaMailSender() |
Modifier and Type | Method and Description |
---|---|
protected Transport |
getTransport(Session session) |
void |
setMaxActive(int maxActive)
Set the maximum number of active transports, managed by the pool.
|
void |
setMaxIdle(int maxIdle)
Set the maximum number of transports that can sit idle in the pool.
|
void |
setMaxWait(long maxWait)
Set the maximum amount of time (in milliseconds) to wait for a transport to be returned from the pool.
|
void |
setMinEvictableIdleTime(long time)
Set the minimum amount of time a transport may sit idle, before it is eligible for eviction.
|
void |
setPassword(String password) |
void |
setTimeBetweenEvictionRuns(long time)
Set the time (in milliseconds) between runs of the idle object eviction thread.
|
void |
setUsername(String userName) |
createMimeMessage, createMimeMessage, doSend, getDefaultEncoding, getDefaultFileTypeMap, getHost, getJavaMailProperties, getPassword, getPort, getProtocol, getSession, getUsername, send, send, send, send, send, send, setDefaultEncoding, setDefaultFileTypeMap, setHost, setJavaMailProperties, setPort, setProtocol, setSession
protected Transport getTransport(Session session) throws NoSuchProviderException
getTransport
in class org.springframework.mail.javamail.JavaMailSenderImpl
PooledTransportWrapper
which borrows a pooled Transport
on connect, and returns it to
the pool on close.NoSuchProviderException
public void setMaxActive(int maxActive)
public void setMaxIdle(int maxIdle)
public void setMaxWait(long maxWait)
public void setTimeBetweenEvictionRuns(long time)
public void setMinEvictableIdleTime(long time)
public void setUsername(String userName)
setUsername
in class org.springframework.mail.javamail.JavaMailSenderImpl
public void setPassword(String password)
setPassword
in class org.springframework.mail.javamail.JavaMailSenderImpl
Copyright © 2005–2017 Alfresco Software. All rights reserved.