Class ImapConnection

All Implemented Interfaces:
Comparable<ImapConnection>

public class ImapConnection extends ServerConnection implements Comparable<ImapConnection>
  • Constructor Details

    • ImapConnection

      public ImapConnection(AbstractConnection ac, AuthenticationProxy proxy)

      Creates an ImapConnection.

      Parameters:
      ac - the connection to be wrapped
      proxy - the authentication proxy to be used for login
  • Method Details

    • setAuth

      public final AuthenticationProxy setAuth(AuthenticationProxy authProxy)

      Setter for the authentication proxy handling incomming requests for authentication.

      Parameters:
      authProxy - the proxy to be set
      Returns:
      the previously set proxy
    • getAuth

      public AuthenticationProxy getAuth()

      Get the authentication proxy of the connection.

      Returns:
      the currently set proxy
    • setId

      public void setId(String id)

      Sets the thread name of the connection handler.

      Parameters:
      id - the thread name to be set
    • setImapState

      public ImapConnectionState setImapState(ImapConnectionState status)

      Sets the current authentication state of the connection.

      Parameters:
      status - the new connection state
      Returns:
      the previously set connection state
    • getImapState

      public ImapConnectionState getImapState()
    • compareTo

      public int compareTo(ImapConnection i)
      Specified by:
      compareTo in interface Comparable<ImapConnection>
    • equals

      public boolean equals(Object i)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • shutdown

      public void shutdown()

      Tear down connection handler thread.

      Overrides:
      shutdown in class AbstractConnection