public class SmtpConnectionFactory extends Object implements org.apache.commons.pool2.PooledObjectFactory<ClosableSmtpConnection>
| Modifier and Type | Field and Description |
|---|---|
protected ConnectionStrategy |
connectionStrategy |
protected List<javax.mail.event.TransportListener> |
defaultTransportListeners |
protected boolean |
invalidateConnectionOnException |
protected javax.mail.Session |
session |
protected TransportStrategy |
transportFactory |
| Constructor and Description |
|---|
SmtpConnectionFactory(javax.mail.Session session,
TransportStrategy transportFactory,
ConnectionStrategy connectionStrategy,
boolean invalidateConnectionOnException) |
SmtpConnectionFactory(javax.mail.Session session,
TransportStrategy transportStrategy,
ConnectionStrategy connectionStrategy,
boolean invalidateConnectionOnException,
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) |
ConnectionStrategy |
getConnectionStrategy() |
List<javax.mail.event.TransportListener> |
getDefaultListeners() |
javax.mail.Session |
getSession() |
TransportStrategy |
getTransportFactory() |
boolean |
isInvalidateConnectionOnException() |
org.apache.commons.pool2.PooledObject<ClosableSmtpConnection> |
makeObject() |
void |
passivateObject(org.apache.commons.pool2.PooledObject<ClosableSmtpConnection> pooledObject) |
boolean |
validateObject(org.apache.commons.pool2.PooledObject<ClosableSmtpConnection> pooledObject) |
protected final javax.mail.Session session
protected final TransportStrategy transportFactory
protected final ConnectionStrategy connectionStrategy
protected final boolean invalidateConnectionOnException
protected List<javax.mail.event.TransportListener> defaultTransportListeners
public SmtpConnectionFactory(javax.mail.Session session,
TransportStrategy transportStrategy,
ConnectionStrategy connectionStrategy,
boolean invalidateConnectionOnException,
Collection<javax.mail.event.TransportListener> defaultTransportListeners)
public SmtpConnectionFactory(javax.mail.Session session,
TransportStrategy transportFactory,
ConnectionStrategy connectionStrategy,
boolean invalidateConnectionOnException)
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)
destroyObject in interface org.apache.commons.pool2.PooledObjectFactory<ClosableSmtpConnection>public 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 List<javax.mail.event.TransportListener> getDefaultListeners()
public boolean isInvalidateConnectionOnException()
public javax.mail.Session getSession()
public TransportStrategy getTransportFactory()
public ConnectionStrategy getConnectionStrategy()
Copyright © 2019. All rights reserved.