org.apache.commons.net.pop3
public class POP3 extends SocketClient
Rather than list it separately for each method, we mention here that every method communicating with the server and throwing an IOException can also throw a MalformedServerReplyException , which is a subclass of IOException. A MalformedServerReplyException will be thrown when the reply received from the server deviates enough from the protocol specification that it cannot be interpreted in a useful manner despite attempts to be as lenient as possible.
See Also: POP3Client
Field Summary | |
---|---|
static int | AUTHORIZATION_STATE A constant representing the POP3 authorization state. |
static int | DEFAULT_PORT The default POP3 port. |
static int | DISCONNECTED_STATE
A constant representing the state where the client is not yet connected
to a POP3 server.
|
static int | TRANSACTION_STATE A constant representing the POP3 transaction state. |
static int | UPDATE_STATE A constant representing the POP3 update state. |
protected ProtocolCommandSupport | _commandSupport_
A ProtocolCommandSupport object used to manage the registering of
ProtocolCommandListeners and te firing of ProtocolCommandEvents.
|
Constructor Summary | |
---|---|
POP3()
The default POP3Client constructor. |
Method Summary | |
---|---|
void | addProtocolCommandListener(ProtocolCommandListener listener)
Adds a ProtocolCommandListener. |
void | getAdditionalReply()
Retrieves the additional lines of a multi-line server reply.
|
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.
|
void | removeProtocolCommandistener(ProtocolCommandListener listener)
Removes a ProtocolCommandListener. |
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.
|
int | sendCommand(int command, String args)
Sends a command an arguments to the server and returns the reply code.
|
int | sendCommand(int command)
Sends a command with no arguments to the server and returns the
reply code.
|
void | setState(int state)
Sets POP3 client state. |
DISCONNECTED_STATE
.
_commandSupport_
.
Parameters: listener The ProtocolCommandListener to add.
getAdditionalReply()
to
fetch the rest of the reply, and then call getReplyString
again. You only have to worry about this if you are implementing
your own client using the sendCommand
methods.
Returns: The last server response.
getAdditionalReply()
to
fetch the rest of the reply, and then call getReplyStrings
again. You only have to worry about this if you are implementing
your own client using the sendCommand
methods.
Returns: The last server response.
Returns: The current POP3 client state.
_commandSupport_
.
Parameters: listener The ProtocolCommandListener to remove.
Parameters: command The POP3 command to send. args The command arguments.
Returns: The server reply code (either POP3Reply.OK or POP3Reply.ERROR).
Parameters: command The POP3 command to send.
Returns: The server reply code (either POP3Reply.OK or POP3Reply.ERROR).
Parameters: command The POP3 command to send (one of the POP3Command constants). args The command arguments.
Returns: The server reply code (either POP3Reply.OK or POP3Reply.ERROR).
Parameters: command The POP3 command to send (one of the POP3Command constants).
Returns: The server reply code (either POP3Reply.OK or POP3Reply.ERROR).
_STATE
constants.
Parameters: state The new state.