Package org.apache.commons.net.pop3
Class ExtendedPOP3Client
java.lang.Object
org.apache.commons.net.SocketClient
org.apache.commons.net.pop3.POP3
org.apache.commons.net.pop3.POP3Client
org.apache.commons.net.pop3.POP3SClient
org.apache.commons.net.pop3.ExtendedPOP3Client
A POP3 Cilent class with protocol and authentication extensions support (RFC2449 and RFC2195).
- Since:
- 3.0
- See Also:
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic enumThe enumeration of currently-supported authentication methods.
- 
Field SummaryFields inherited from class org.apache.commons.net.pop3.POP3_commandSupport_, AUTHORIZATION_STATE, DEFAULT_PORT, DISCONNECTED_STATE, TRANSACTION_STATE, UPDATE_STATEFields inherited from class org.apache.commons.net.SocketClient_defaultPort_, _hostname_, _input_, _output_, _serverSocketFactory_, _socket_, _socketFactory_, _timeout_, connectTimeout, NETASCII_EOL, remoteInetSocketAddress
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleanauth(ExtendedPOP3Client.AUTH_METHOD method, String user, String password) Authenticate to the POP3 server by sending the AUTH command with the selected mechanism, using the given user and the given password.Methods inherited from class org.apache.commons.net.pop3.POP3SClient_connectAction_, execTLS, getEnabledCipherSuites, getEnabledProtocols, getHostnameVerifier, getTrustManager, isEndpointCheckingEnabled, setEnabledCipherSuites, setEnabledProtocols, setEndpointCheckingEnabled, setHostnameVerifier, setKeyManager, setTrustManagerMethods inherited from class org.apache.commons.net.pop3.POP3Clientcapa, deleteMessage, listMessage, listMessages, listUniqueIdentifier, listUniqueIdentifiers, login, login, logout, noop, reset, retrieveMessage, retrieveMessageTop, statusMethods inherited from class org.apache.commons.net.pop3.POP3disconnect, getAdditionalReply, getCommandSupport, getReplyString, getReplyStrings, getState, removeProtocolCommandistener, sendCommand, sendCommand, sendCommand, sendCommand, setStateMethods inherited from class org.apache.commons.net.SocketClientaddProtocolCommandListener, applySocketAttributes, checkOpenOutputStream, connect, connect, connect, connect, connect, connect, createCommandSupport, fireCommandSent, fireReplyReceived, getCharset, getCharsetName, getConnectTimeout, getDefaultPort, getDefaultTimeout, getKeepAlive, getLocalAddress, getLocalPort, getProxy, getReceiveBufferSize, getRemoteAddress, getRemoteInetSocketAddress, getRemotePort, getSendBufferSize, getServerSocketFactory, getSoLinger, getSoTimeout, getTcpNoDelay, isAvailable, isConnected, removeProtocolCommandListener, setCharset, setConnectTimeout, setDefaultPort, setDefaultTimeout, setKeepAlive, setProxy, setReceiveBufferSize, setSendBufferSize, setServerSocketFactory, setSocketFactory, setSoLinger, setSoTimeout, setTcpNoDelay, verifyRemote
- 
Constructor Details- 
ExtendedPOP3ClientThe default ExtendedPOP3Client constructor. Creates a new Extended POP3 Client.- Throws:
- NoSuchAlgorithmException- on error
 
 
- 
- 
Method Details- 
authpublic boolean auth(ExtendedPOP3Client.AUTH_METHOD method, String user, String password) throws IOException, NoSuchAlgorithmException, InvalidKeyException, InvalidKeySpecException Authenticate to the POP3 server by sending the AUTH command with the selected mechanism, using the given user and the given password.- Parameters:
- method- the- ExtendedPOP3Client.AUTH_METHODto use
- user- the user name
- password- the password
- Returns:
- True if successfully completed, false if not.
- Throws:
- IOException- If an I/O error occurs while either sending a command to the server or receiving a reply from the server.
- NoSuchAlgorithmException- If the CRAM hash algorithm cannot be instantiated by the Java runtime system.
- InvalidKeyException- If the CRAM hash algorithm failed to use the given password.
- InvalidKeySpecException- If the CRAM hash algorithm failed to use the given password.
 
 
-