AuthenticatingIMAPClient
public class IMAPSClient extends IMAPClient
setHostnameVerifier(HostnameVerifier)
or setEndpointCheckingEnabled(boolean)
(on Java 1.7+) to enable verification.IMAP.IMAPChunkListener, IMAP.IMAPState
IMAPClient.FETCH_ITEM_NAMES, IMAPClient.SEARCH_CRITERIA, IMAPClient.STATUS_DATA_ITEMS
Modifier and Type | Field | Description |
---|---|---|
static int |
DEFAULT_IMAPS_PORT |
The default IMAP over SSL port.
|
static java.lang.String |
DEFAULT_PROTOCOL |
Default secure socket protocol name.
|
__DEFAULT_ENCODING, __writer, _reader, DEFAULT_PORT, TRUE_CHUNK_LISTENER
_defaultPort_, _hostname_, _input_, _output_, _serverSocketFactory_, _socket_, _socketFactory_, _timeout_, connectTimeout, NETASCII_EOL
Constructor | Description |
---|---|
IMAPSClient() |
Constructor for IMAPSClient.
|
IMAPSClient(boolean implicit) |
Constructor for IMAPSClient.
|
IMAPSClient(boolean implicit,
javax.net.ssl.SSLContext ctx) |
Constructor for IMAPSClient.
|
IMAPSClient(java.lang.String proto) |
Constructor for IMAPSClient.
|
IMAPSClient(java.lang.String proto,
boolean implicit) |
Constructor for IMAPSClient.
|
IMAPSClient(java.lang.String proto,
boolean implicit,
javax.net.ssl.SSLContext ctx) |
Constructor for IMAPSClient.
|
IMAPSClient(javax.net.ssl.SSLContext context) |
Constructor for IMAPSClient.
|
Modifier and Type | Method | Description |
---|---|---|
protected void |
_connectAction_() |
Because there are so many connect() methods,
the _connectAction_() method is provided as a means of performing
some action immediately after establishing a connection,
rather than reimplementing all of the connect() methods.
|
boolean |
execTLS() |
The TLS command execution.
|
java.lang.String[] |
getEnabledCipherSuites() |
Returns the names of the cipher suites which could be enabled
for use on this connection.
|
java.lang.String[] |
getEnabledProtocols() |
Returns the names of the protocol versions which are currently
enabled for use on this connection.
|
javax.net.ssl.HostnameVerifier |
getHostnameVerifier() |
Get the currently configured
HostnameVerifier . |
javax.net.ssl.TrustManager |
getTrustManager() |
Get the currently configured
TrustManager . |
boolean |
isEndpointCheckingEnabled() |
Return whether or not endpoint identification using the HTTPS algorithm
on Java 1.7+ is enabled.
|
void |
setEnabledCipherSuites(java.lang.String[] cipherSuites) |
Controls which particular cipher suites are enabled for use on this
connection.
|
void |
setEnabledProtocols(java.lang.String[] protocolVersions) |
Controls which particular protocol versions are enabled for use on this
connection.
|
void |
setEndpointCheckingEnabled(boolean enable) |
Automatic endpoint identification checking using the HTTPS algorithm
is supported on Java 1.7+.
|
void |
setHostnameVerifier(javax.net.ssl.HostnameVerifier newHostnameVerifier) |
Override the default
HostnameVerifier to use. |
void |
setKeyManager(javax.net.ssl.KeyManager newKeyManager) |
Set a
KeyManager to use. |
void |
setTrustManager(javax.net.ssl.TrustManager newTrustManager) |
Override the default
TrustManager to use. |
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
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 static final int DEFAULT_IMAPS_PORT
public static final java.lang.String DEFAULT_PROTOCOL
public IMAPSClient()
public IMAPSClient(boolean implicit)
implicit
- The security mode (Implicit/Explicit).public IMAPSClient(java.lang.String proto)
proto
- the protocol.public IMAPSClient(java.lang.String proto, boolean implicit)
proto
- the protocol.implicit
- The security mode(Implicit/Explicit).public IMAPSClient(java.lang.String proto, boolean implicit, javax.net.ssl.SSLContext ctx)
proto
- the protocol.implicit
- The security mode(Implicit/Explicit).ctx
- the SSL contextpublic IMAPSClient(boolean implicit, javax.net.ssl.SSLContext ctx)
implicit
- The security mode(Implicit/Explicit).ctx
- A pre-configured SSL Context.public IMAPSClient(javax.net.ssl.SSLContext context)
context
- A pre-configured SSL Context.protected void _connectAction_() throws java.io.IOException
_connectAction_
in class IMAP
java.io.IOException
- If it is thrown by _connectAction_().SocketClient._connectAction_()
public void setKeyManager(javax.net.ssl.KeyManager newKeyManager)
KeyManager
to use.newKeyManager
- The KeyManager implementation to set.KeyManagerUtils
public void setEnabledCipherSuites(java.lang.String[] cipherSuites)
cipherSuites
- The cipher suites.public java.lang.String[] getEnabledCipherSuites()
Socket
is not an SSLSocket
instance, returns null.null
.public void setEnabledProtocols(java.lang.String[] protocolVersions)
protocolVersions
- The protocol versions.public java.lang.String[] getEnabledProtocols()
Socket
is not an SSLSocket
instance, returns null.null
.public boolean execTLS() throws javax.net.ssl.SSLException, java.io.IOException
javax.net.ssl.SSLException
- If the server reply code is not positive.java.io.IOException
- If an I/O error occurs while sending
the command or performing the negotiation.public javax.net.ssl.TrustManager getTrustManager()
TrustManager
.public void setTrustManager(javax.net.ssl.TrustManager newTrustManager)
TrustManager
to use.newTrustManager
- The TrustManager implementation to set.TrustManagerUtils
public javax.net.ssl.HostnameVerifier getHostnameVerifier()
HostnameVerifier
.public void setHostnameVerifier(javax.net.ssl.HostnameVerifier newHostnameVerifier)
HostnameVerifier
to use.newHostnameVerifier
- The HostnameVerifier implementation to set or null
to disable.public boolean isEndpointCheckingEnabled()
public void setEndpointCheckingEnabled(boolean enable)
enable
- Enable automatic endpoint identification checking using the HTTPS algorithm on Java 1.7+.