public class AuthenticatingIMAPClient extends IMAPSClient
IMAPSClient
Modifier and Type | Class | Description |
---|---|---|
static class |
AuthenticatingIMAPClient.AUTH_METHOD |
The enumeration of currently-supported authentication methods.
|
IMAP.IMAPChunkListener, IMAP.IMAPState
IMAPClient.FETCH_ITEM_NAMES, IMAPClient.SEARCH_CRITERIA, IMAPClient.STATUS_DATA_ITEMS
__DEFAULT_ENCODING, __writer, _reader, DEFAULT_PORT, TRUE_CHUNK_LISTENER
DEFAULT_IMAPS_PORT, DEFAULT_PROTOCOL
_defaultPort_, _hostname_, _input_, _output_, _serverSocketFactory_, _socket_, _socketFactory_, _timeout_, connectTimeout, NETASCII_EOL
Constructor | Description |
---|---|
AuthenticatingIMAPClient() |
Constructor for AuthenticatingIMAPClient that delegates to IMAPSClient.
|
AuthenticatingIMAPClient(boolean implicit) |
Constructor for AuthenticatingIMAPClient that delegates to IMAPSClient.
|
AuthenticatingIMAPClient(boolean implicit,
javax.net.ssl.SSLContext ctx) |
Constructor for AuthenticatingIMAPClient that delegates to IMAPSClient.
|
AuthenticatingIMAPClient(java.lang.String proto) |
Constructor for AuthenticatingIMAPClient that delegates to IMAPSClient.
|
AuthenticatingIMAPClient(java.lang.String proto,
boolean implicit) |
Constructor for AuthenticatingIMAPClient that delegates to IMAPSClient.
|
AuthenticatingIMAPClient(java.lang.String proto,
boolean implicit,
javax.net.ssl.SSLContext ctx) |
Constructor for AuthenticatingIMAPClient that delegates to IMAPSClient.
|
AuthenticatingIMAPClient(javax.net.ssl.SSLContext context) |
Constructor for AuthenticatingIMAPClient that delegates to IMAPSClient.
|
Modifier and Type | Method | Description |
---|---|---|
boolean |
auth(AuthenticatingIMAPClient.AUTH_METHOD method,
java.lang.String username,
java.lang.String password) |
Authenticate to the IMAP server by sending the AUTHENTICATE command with the
selected mechanism, using the given username and the given password.
|
boolean |
authenticate(AuthenticatingIMAPClient.AUTH_METHOD method,
java.lang.String username,
java.lang.String password) |
Authenticate to the IMAP server by sending the AUTHENTICATE command with the
selected mechanism, using the given username and the given password.
|
disconnect, doCommand, doCommand, fireReplyReceived, generateCommandID, getReplyString, getReplyStrings, getState, sendCommand, sendCommand, sendCommand, sendCommand, sendData, setChunkListener, setState
append, append, append, capability, check, close, copy, create, delete, examine, expunge, fetch, list, login, logout, lsub, noop, rename, search, search, select, status, store, subscribe, uid, unsubscribe
_connectAction_, execTLS, getEnabledCipherSuites, getEnabledProtocols, getHostnameVerifier, getTrustManager, isEndpointCheckingEnabled, setEnabledCipherSuites, setEnabledProtocols, setEndpointCheckingEnabled, setHostnameVerifier, setKeyManager, setTrustManager
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addProtocolCommandListener, connect, connect, connect, connect, connect, connect, createCommandSupport, fireCommandSent, getCharset, getCharsetName, getCommandSupport, getConnectTimeout, getDefaultPort, getDefaultTimeout, getKeepAlive, getLocalAddress, getLocalPort, getProxy, getReceiveBufferSize, getRemoteAddress, getRemotePort, getSendBufferSize, getServerSocketFactory, getSoLinger, getSoTimeout, getTcpNoDelay, isAvailable, isConnected, removeProtocolCommandListener, setCharset, setConnectTimeout, setDefaultPort, setDefaultTimeout, setKeepAlive, setProxy, setReceiveBufferSize, setSendBufferSize, setServerSocketFactory, setSocketFactory, setSoLinger, setSoTimeout, setTcpNoDelay, verifyRemote
public AuthenticatingIMAPClient()
public AuthenticatingIMAPClient(boolean implicit)
implicit
- The security mode (Implicit/Explicit).public AuthenticatingIMAPClient(java.lang.String proto)
proto
- the protocol.public AuthenticatingIMAPClient(java.lang.String proto, boolean implicit)
proto
- the protocol.implicit
- The security mode(Implicit/Explicit).public AuthenticatingIMAPClient(java.lang.String proto, boolean implicit, javax.net.ssl.SSLContext ctx)
proto
- the protocol.implicit
- The security mode(Implicit/Explicit).ctx
- the contextpublic AuthenticatingIMAPClient(boolean implicit, javax.net.ssl.SSLContext ctx)
implicit
- The security mode(Implicit/Explicit).ctx
- A pre-configured SSL Context.public AuthenticatingIMAPClient(javax.net.ssl.SSLContext context)
context
- A pre-configured SSL Context.public boolean authenticate(AuthenticatingIMAPClient.AUTH_METHOD method, java.lang.String username, java.lang.String password) throws java.io.IOException, java.security.NoSuchAlgorithmException, java.security.InvalidKeyException, java.security.spec.InvalidKeySpecException
method
- the method nameusername
- userpassword
- passwordjava.io.IOException
- If an I/O error occurs while either sending a
command to the server or receiving a reply from the server.java.security.NoSuchAlgorithmException
- If the CRAM hash algorithm
cannot be instantiated by the Java runtime system.java.security.InvalidKeyException
- If the CRAM hash algorithm
failed to use the given password.java.security.spec.InvalidKeySpecException
- If the CRAM hash algorithm
failed to use the given password.public boolean auth(AuthenticatingIMAPClient.AUTH_METHOD method, java.lang.String username, java.lang.String password) throws java.io.IOException, java.security.NoSuchAlgorithmException, java.security.InvalidKeyException, java.security.spec.InvalidKeySpecException
method
- the method nameusername
- userpassword
- passwordjava.io.IOException
- If an I/O error occurs while either sending a
command to the server or receiving a reply from the server.java.security.NoSuchAlgorithmException
- If the CRAM hash algorithm
cannot be instantiated by the Java runtime system.java.security.InvalidKeyException
- If the CRAM hash algorithm
failed to use the given password.java.security.spec.InvalidKeySpecException
- If the CRAM hash algorithm
failed to use the given password.