Class Pop3ReceiverFactory

java.lang.Object
com.adaptris.mail.Pop3ReceiverFactory
All Implemented Interfaces:
MailReceiverFactory
Direct Known Subclasses:
Pop3sReceiverFactory

public class Pop3ReceiverFactory extends Object implements MailReceiverFactory
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 Details

    • Pop3ReceiverFactory

      public Pop3ReceiverFactory()
  • Method Details

    • createClient

      public MailReceiver createClient(javax.mail.URLName url) throws MailException
      Specified by:
      createClient in interface MailReceiverFactory
      Throws:
      MailException
    • getConnectTimeout

      public Integer getConnectTimeout()
    • setConnectTimeout

      public void setConnectTimeout(Integer i)
      Set the connect timeout in ms.
      Parameters:
      i - the connect timeout.
      See Also:
      • SocketClient.setConnectTimeout(int)
    • getReceiveBufferSize

      public Integer getReceiveBufferSize()
    • setReceiveBufferSize

      public void setReceiveBufferSize(Integer i)
      Set the receive buffer size in bytes.
      Parameters:
      i - the receive buffer size
      See Also:
      • SocketClient.setReceiveBufferSize(int)
    • getSendBufferSize

      public Integer getSendBufferSize()
    • setSendBufferSize

      public void setSendBufferSize(Integer i)
      Set the send buffer size in bytes.
      Parameters:
      i - the send buffer size
      See Also:
      • SocketClient.setSendBufferSize(int)
    • getTcpNoDelay

      public Boolean getTcpNoDelay()
    • setTcpNoDelay

      public void setTcpNoDelay(Boolean tcpNoDelay)
      Enable / disable Nagle's algorithm
      See Also:
      • SocketClient.setTcpNoDelay(boolean)
    • getKeepAlive

      public Boolean getKeepAlive()
    • setKeepAlive

      public void setKeepAlive(Boolean keepAlive)
      Enable/disable keep alive (SO_KEEPALIVE)
      See Also:
      • SocketClient.setKeepAlive(boolean)
    • getTimeout

      public Integer getTimeout()
    • setTimeout

      public void setTimeout(Integer i)
      Set the default timeout for socket operations.
      Parameters:
      i - the timeout.
      See Also:
      • SocketClient.setDefaultTimeout(int)