Package com.adaptris.mail
Class Pop3ReceiverFactory
java.lang.Object
com.adaptris.mail.Pop3ReceiverFactory
- All Implemented Interfaces:
MailReceiverFactory
- Direct Known Subclasses:
Pop3sReceiverFactory
MailReceiverFactory that supports POP3 using the commons net POP3Client.
This only supports POP3. Attempts to use POP3S/IMAP(S) will cause an exception.
Because the underlying POP3 client needs to implement the existing MailReceiver interface, it will attempt to retrieve
every message available int the POP3 mailbox before any filtering is performed. If the POP3 mailbox is large, or has many
messages that need to be filtered; then performance may be impaired.
In the adapter configuration file this class is aliased as pop3-receiver-factory which is the preferred alternative to the fully qualified classname when building your configuration.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateClient(javax.mail.URLName url) voidSet the connect timeout in ms.voidsetKeepAlive(Boolean keepAlive) Enable/disable keep alive (SO_KEEPALIVE)voidSet the receive buffer size in bytes.voidSet the send buffer size in bytes.voidsetTcpNoDelay(Boolean tcpNoDelay) Enable / disable Nagle's algorithmvoidSet the default timeout for socket operations.
-
Constructor Details
-
Pop3ReceiverFactory
public Pop3ReceiverFactory()
-
-
Method Details
-
createClient
- Specified by:
createClientin interfaceMailReceiverFactory- Throws:
MailException
-
getConnectTimeout
-
setConnectTimeout
Set the connect timeout in ms.- Parameters:
i- the connect timeout.- See Also:
-
SocketClient.setConnectTimeout(int)
-
getReceiveBufferSize
-
setReceiveBufferSize
Set the receive buffer size in bytes.- Parameters:
i- the receive buffer size- See Also:
-
SocketClient.setReceiveBufferSize(int)
-
getSendBufferSize
-
setSendBufferSize
Set the send buffer size in bytes.- Parameters:
i- the send buffer size- See Also:
-
SocketClient.setSendBufferSize(int)
-
getTcpNoDelay
-
setTcpNoDelay
Enable / disable Nagle's algorithm- See Also:
-
SocketClient.setTcpNoDelay(boolean)
-
getKeepAlive
-
setKeepAlive
Enable/disable keep alive (SO_KEEPALIVE)- See Also:
-
SocketClient.setKeepAlive(boolean)
-
getTimeout
-
setTimeout
Set the default timeout for socket operations.- Parameters:
i- the timeout.- See Also:
-
SocketClient.setDefaultTimeout(int)
-