public final class SSLEngineImpl
extends javax.net.ssl.SSLEngine
Modifier and Type | Field and Description |
---|---|
static byte |
clauth_none |
static byte |
clauth_requested |
static byte |
clauth_required |
Modifier and Type | Method and Description |
---|---|
void |
beginHandshake() |
void |
closeInbound() |
void |
closeOutbound() |
java.lang.String |
getApplicationProtocol() |
java.lang.Runnable |
getDelegatedTask()
Returns a delegated
Runnable task for
this SSLEngine . |
java.lang.String[] |
getEnabledCipherSuites()
Returns the names of the SSL cipher suites which are currently enabled
for use on this connection.
|
java.lang.String[] |
getEnabledProtocols() |
boolean |
getEnableSessionCreation()
Returns true if new connections may cause creation of new SSL
sessions.
|
javax.net.ssl.SSLSession |
getHandshakeSession() |
javax.net.ssl.SSLEngineResult.HandshakeStatus |
getHandshakeStatus() |
boolean |
getNeedClientAuth() |
javax.net.ssl.SSLSession |
getSession()
Returns the current
SSLSession for this
SSLEngine |
javax.net.ssl.SSLParameters |
getSSLParameters()
Returns the SSLParameters in effect for this SSLEngine.
|
java.lang.String[] |
getSupportedCipherSuites()
Returns the names of the cipher suites which could be enabled for use
on an SSL connection.
|
java.lang.String[] |
getSupportedProtocols()
Returns the protocols that are supported by this implementation.
|
boolean |
getUseClientMode() |
boolean |
getWantClientAuth() |
boolean |
isInboundDone()
Returns the network inbound data closure state
|
boolean |
isOutboundDone()
Returns the outbound application data closure state
|
void |
setEnabledCipherSuites(java.lang.String[] suites)
Controls which particular cipher suites are enabled for use on
this connection.
|
void |
setEnabledProtocols(java.lang.String[] protocols)
Controls which protocols are enabled for use on
this connection.
|
void |
setEnableSessionCreation(boolean flag)
Controls whether new connections may cause creation of new SSL
sessions.
|
void |
setNeedClientAuth(boolean flag)
Sets the flag controlling whether a server mode engine
*REQUIRES* SSL client authentication.
|
void |
setSSLParameters(javax.net.ssl.SSLParameters params)
Applies SSLParameters to this engine.
|
void |
setUseClientMode(boolean flag)
Sets the flag controlling whether the engine is in SSL
client or server mode.
|
void |
setWantClientAuth(boolean flag)
Sets the flag controlling whether a server mode engine
*REQUESTS* SSL client authentication.
|
java.lang.String |
toString()
Returns a printable representation of this end of the connection.
|
javax.net.ssl.SSLEngineResult |
unwrap(java.nio.ByteBuffer netData,
java.nio.ByteBuffer[] appData,
int offset,
int length)
Unwraps a buffer.
|
javax.net.ssl.SSLEngineResult |
wrap(java.nio.ByteBuffer[] appData,
int offset,
int length,
java.nio.ByteBuffer netData)
Wraps a buffer.
|
public static final byte clauth_none
public static final byte clauth_requested
public static final byte clauth_required
public javax.net.ssl.SSLEngineResult.HandshakeStatus getHandshakeStatus()
getHandshakeStatus
in class javax.net.ssl.SSLEngine
public void beginHandshake() throws javax.net.ssl.SSLException
beginHandshake
in class javax.net.ssl.SSLEngine
javax.net.ssl.SSLException
public javax.net.ssl.SSLEngineResult unwrap(java.nio.ByteBuffer netData, java.nio.ByteBuffer[] appData, int offset, int length) throws javax.net.ssl.SSLException
unwrap
in class javax.net.ssl.SSLEngine
javax.net.ssl.SSLException
public javax.net.ssl.SSLEngineResult wrap(java.nio.ByteBuffer[] appData, int offset, int length, java.nio.ByteBuffer netData) throws javax.net.ssl.SSLException
wrap
in class javax.net.ssl.SSLEngine
javax.net.ssl.SSLException
public void closeOutbound()
closeOutbound
in class javax.net.ssl.SSLEngine
public boolean isOutboundDone()
isOutboundDone
in class javax.net.ssl.SSLEngine
public void closeInbound() throws javax.net.ssl.SSLException
closeInbound
in class javax.net.ssl.SSLEngine
javax.net.ssl.SSLException
public boolean isInboundDone()
isInboundDone
in class javax.net.ssl.SSLEngine
public javax.net.ssl.SSLSession getSession()
SSLSession
for this
SSLEngine
These can be long lived, and frequently correspond to an entire login session for some user.
getSession
in class javax.net.ssl.SSLEngine
public javax.net.ssl.SSLSession getHandshakeSession()
getHandshakeSession
in class javax.net.ssl.SSLEngine
public java.lang.Runnable getDelegatedTask()
Runnable
task for
this SSLEngine
.getDelegatedTask
in class javax.net.ssl.SSLEngine
public void setEnableSessionCreation(boolean flag)
setEnableSessionCreation
in class javax.net.ssl.SSLEngine
public boolean getEnableSessionCreation()
getEnableSessionCreation
in class javax.net.ssl.SSLEngine
public void setNeedClientAuth(boolean flag)
setNeedClientAuth
in class javax.net.ssl.SSLEngine
public boolean getNeedClientAuth()
getNeedClientAuth
in class javax.net.ssl.SSLEngine
public void setWantClientAuth(boolean flag)
setWantClientAuth
in class javax.net.ssl.SSLEngine
public boolean getWantClientAuth()
getWantClientAuth
in class javax.net.ssl.SSLEngine
public void setUseClientMode(boolean flag)
setUseClientMode
in class javax.net.ssl.SSLEngine
public boolean getUseClientMode()
getUseClientMode
in class javax.net.ssl.SSLEngine
public java.lang.String[] getSupportedCipherSuites()
getSupportedCipherSuites
in class javax.net.ssl.SSLEngine
public void setEnabledCipherSuites(java.lang.String[] suites)
setEnabledCipherSuites
in class javax.net.ssl.SSLEngine
suites
- Names of all the cipher suites to enable.public java.lang.String[] getEnabledCipherSuites()
getEnabledCipherSuites
in class javax.net.ssl.SSLEngine
public java.lang.String[] getSupportedProtocols()
getSupportedProtocols
in class javax.net.ssl.SSLEngine
public void setEnabledProtocols(java.lang.String[] protocols)
setEnabledProtocols
in class javax.net.ssl.SSLEngine
protocols
- protocols to enable.java.lang.IllegalArgumentException
- when one of the protocols
named by the parameter is not supported.public java.lang.String[] getEnabledProtocols()
getEnabledProtocols
in class javax.net.ssl.SSLEngine
public javax.net.ssl.SSLParameters getSSLParameters()
getSSLParameters
in class javax.net.ssl.SSLEngine
public void setSSLParameters(javax.net.ssl.SSLParameters params)
setSSLParameters
in class javax.net.ssl.SSLEngine
public java.lang.String getApplicationProtocol()
public java.lang.String toString()
toString
in class java.lang.Object