|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.oroinc.net.SocketClient | +--com.oroinc.net.pop3.POP3
The POP3 class is not meant to be used by itself and is provided only so that you may easily implement your own POP3 client if you so desire. If you have no need to perform your own implementation, you should use POP3Client.
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.
POP3Client
,
MalformedServerReplyException
Field Summary | |
protected ProtocolCommandSupport |
_commandSupport_
A ProtocolCommandSupport object used to manage the registering of ProtocolCommandListeners and te firing of ProtocolCommandEvents. |
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. |
Fields inherited from class com.oroinc.net.SocketClient |
_defaultPort_, _input_, _isConnected_, _output_, _socket_, _socketFactory_, _timeout_, NETASCII_EOL |
Constructor Summary | |
POP3()
The default POP3Client constructor. |
Method Summary | |
protected void |
_connectAction_()
Performs connection initialization and sets state to AUTHORIZATION_STATE . |
void |
addProtocolCommandListener(ProtocolCommandListener listener)
Adds a ProtocolCommandListener. |
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. |
java.lang.String |
getReplyString()
Returns the reply to the last command sent to the server. |
java.lang.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(int command)
Sends a command with no arguments to the server and returns the reply code. |
int |
sendCommand(int command,
java.lang.String args)
Sends a command an arguments to the server and returns the reply code. |
int |
sendCommand(java.lang.String command)
Sends a command with no arguments to the server and returns the reply code. |
int |
sendCommand(java.lang.String command,
java.lang.String args)
Sends a command an arguments to the server and returns the reply code. |
void |
setState(int state)
Sets POP3 client state. |
Methods inherited from class com.oroinc.net.SocketClient |
connect, connect, connect, connect, connect, connect, getDefaultPort, getDefaultTimeout, getLocalAddress, getLocalPort, getRemoteAddress, getRemotePort, getSoLinger, getSoTimeout, getTcpNoDelay, isConnected, setDefaultPort, setDefaultTimeout, setSocketFactory, setSoLinger, setSoTimeout, setTcpNoDelay, verifyRemote |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int DEFAULT_PORT
public static final int DISCONNECTED_STATE
public static final int AUTHORIZATION_STATE
public static final int TRANSACTION_STATE
public static final int UPDATE_STATE
protected ProtocolCommandSupport _commandSupport_
Constructor Detail |
public POP3()
DISCONNECTED_STATE
.Method Detail |
protected void _connectAction_() throws java.io.IOException
AUTHORIZATION_STATE
._connectAction_
in class SocketClient
public void addProtocolCommandListener(ProtocolCommandListener listener)
listener
- The ProtocolCommandListener to add.public void removeProtocolCommandistener(ProtocolCommandListener listener)
listener
- The ProtocolCommandListener to remove.public void setState(int state)
_STATE
constants.
state
- The new state.public int getState()
public void getAdditionalReply() throws java.io.IOException
public void disconnect() throws java.io.IOException
DISCONNECTED_STATE
. The reply text information
from the last issued command is voided to allow garbage collection
of the memory used to store that information.
disconnect
in class SocketClient
java.io.IOException
- If there is an error in disconnecting.public int sendCommand(java.lang.String command, java.lang.String args) throws java.io.IOException
command
- The POP3 command to send.args
- The command arguments.public int sendCommand(java.lang.String command) throws java.io.IOException
command
- The POP3 command to send.public int sendCommand(int command, java.lang.String args) throws java.io.IOException
command
- The POP3 command to send
(one of the POP3Command constants).args
- The command arguments.public int sendCommand(int command) throws java.io.IOException
command
- The POP3 command to send
(one of the POP3Command constants).public java.lang.String[] getReplyStrings()
getReplyStrings
again. You only have to worry about this if you are implementing
your own client using the sendCommand methods.
public java.lang.String getReplyString()
getReplyString
again. You only have to worry about this if you are implementing
your own client using the sendCommand methods.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |