Example usage for Java org.apache.commons.net.pop3 POP3Client fields, constructors, methods, implement or subclass
The text is from its open source code.
void | addProtocolCommandListener(ProtocolCommandListener listener) Adds a ProtocolCommandListener. |
void | connect(InetAddress host) Opens a Socket connected to a remote host at the current default port and originating from the current host at a system assigned port. |
void | connect(InetAddress host, int port) Opens a Socket connected to a remote host at the specified port and originating from the current host at a system assigned port. |
boolean | deleteMessage(int messageId) Delete a message from the POP3 server. |
void | disconnect() Disconnects the client from the server, and sets the state to DISCONNECTED_STATE . |
void | getAdditionalReply() Retrieves the additional lines of a multi-line server reply. |
int | getDefaultPort() Returns the current value of the default port (stored in #_defaultPort_ _defaultPort_ ). |
String | getReplyString() Returns the reply to the last command sent to the server. |
String[] | getReplyStrings() Returns an array of lines received as a reply to the last command sent to the server. |
int | getState() Returns the current POP3 client state. |
boolean | isConnected() Returns true if the client is currently connected to a server. |
POP3MessageInfo | listMessage(int messageId) List an individual message. |
POP3MessageInfo[] | listMessages() List all messages. |
POP3MessageInfo | listUniqueIdentifier(int messageId) List the unique identifier for a message. |
POP3MessageInfo[] | listUniqueIdentifiers() List the unique identifiers for all messages. |
boolean | login(String username, String password) Login to the POP3 server with the given username and password. |
boolean | logout() Logout of the POP3 server. |
boolean | noop() Send a NOOP command to the POP3 server. |
boolean | reset() Reset the POP3 session. |
Reader | retrieveMessage(int messageId) Retrieve a message from the POP3 server. |
Reader | retrieveMessageTop(int messageId, int numLines) Retrieve only the specified top number of lines of a message from the POP3 server. |
int | sendCommand(String command, String args) Sends a command an arguments to the server and returns the reply code. |
int | sendCommand(String command) Sends a command with no arguments to the server and returns the reply code. |
void | setConnectTimeout(int connectTimeout) Sets the connection timeout in milliseconds, which will be passed to the Socket object's connect() method. |
void | setDefaultPort(int port) Sets the default port the SocketClient should connect to when a port is not specified. |
void | setDefaultTimeout(int timeout) Set the default timeout in milliseconds to use when opening a socket. |
void | setKeepAlive(boolean keepAlive) Sets the SO_KEEPALIVE flag on the currently opened socket. |
void | setReceiveBufferSize(int size) Sets the underlying socket receive buffer size. |
void | setSendBufferSize(int size) Set the underlying socket send buffer size. |
void | setSoTimeout(int timeout) Set the timeout in milliseconds of a currently open connection. |
void | setState(int state) Set the internal POP3 state. |
void | setTcpNoDelay(boolean on) Enables or disables the Nagle's algorithm (TCP_NODELAY) on the currently opened socket. |
POP3MessageInfo | status() Get the mailbox status. |