public class SmtpConnectionFactory extends Object implements org.apache.commons.pool2.PooledObjectFactory<ClosableSmtpConnection>
| Modifier and Type | Field and Description |
|---|---|
protected ConnectionStrategy |
connectionStrategy |
protected Collection<javax.mail.event.TransportListener> |
defaultTransportListeners |
protected javax.mail.Session |
session |
protected TransportStrategy |
transportFactory |
| Constructor and Description |
|---|
SmtpConnectionFactory(javax.mail.Session session,
TransportStrategy transportFactory,
ConnectionStrategy connectionStrategy) |
SmtpConnectionFactory(javax.mail.Session session,
TransportStrategy transportStrategy,
ConnectionStrategy connectionStrategy,
Collection<javax.mail.event.TransportListener> defaultTransportListeners) |
| Modifier and Type | Method and Description |
|---|---|
void |
activateObject(org.apache.commons.pool2.PooledObject<ClosableSmtpConnection> pooledObject) |
void |
destroyObject(org.apache.commons.pool2.PooledObject<ClosableSmtpConnection> pooledObject) |
List<javax.mail.event.TransportListener> |
getDefaultListeners() |
javax.mail.Session |
getSession() |
org.apache.commons.pool2.PooledObject<ClosableSmtpConnection> |
makeObject() |
void |
passivateObject(org.apache.commons.pool2.PooledObject<ClosableSmtpConnection> pooledObject) |
void |
setDefaultListeners(Collection<javax.mail.event.TransportListener> listeners) |
boolean |
validateObject(org.apache.commons.pool2.PooledObject<ClosableSmtpConnection> pooledObject) |
protected final javax.mail.Session session
protected final TransportStrategy transportFactory
protected final ConnectionStrategy connectionStrategy
protected Collection<javax.mail.event.TransportListener> defaultTransportListeners
public SmtpConnectionFactory(javax.mail.Session session,
TransportStrategy transportStrategy,
ConnectionStrategy connectionStrategy,
Collection<javax.mail.event.TransportListener> defaultTransportListeners)
public SmtpConnectionFactory(javax.mail.Session session,
TransportStrategy transportFactory,
ConnectionStrategy connectionStrategy)
public org.apache.commons.pool2.PooledObject<ClosableSmtpConnection> makeObject() throws Exception
makeObject in interface org.apache.commons.pool2.PooledObjectFactory<ClosableSmtpConnection>Exceptionpublic void destroyObject(org.apache.commons.pool2.PooledObject<ClosableSmtpConnection> pooledObject) throws Exception
destroyObject in interface org.apache.commons.pool2.PooledObjectFactory<ClosableSmtpConnection>Exceptionpublic boolean validateObject(org.apache.commons.pool2.PooledObject<ClosableSmtpConnection> pooledObject)
validateObject in interface org.apache.commons.pool2.PooledObjectFactory<ClosableSmtpConnection>public void activateObject(org.apache.commons.pool2.PooledObject<ClosableSmtpConnection> pooledObject) throws Exception
activateObject in interface org.apache.commons.pool2.PooledObjectFactory<ClosableSmtpConnection>Exceptionpublic void passivateObject(org.apache.commons.pool2.PooledObject<ClosableSmtpConnection> pooledObject) throws Exception
passivateObject in interface org.apache.commons.pool2.PooledObjectFactory<ClosableSmtpConnection>Exceptionpublic void setDefaultListeners(Collection<javax.mail.event.TransportListener> listeners)
public List<javax.mail.event.TransportListener> getDefaultListeners()
public javax.mail.Session getSession()
Copyright © 2016. All rights reserved.