public class SslTransport extends TcpTransport implements SecuredSession
| Modifier and Type | Class and Description |
|---|---|
(package private) static class |
SslTransport.ClientAuth |
class |
SslTransport.SSLChannel |
TcpTransport.CANCELED, TcpTransport.CANCELING, TcpTransport.CONNECTED, TcpTransport.CONNECTING, TcpTransport.DISCONNECTED, TcpTransport.OneWay, TcpTransport.RateLimitingChannel, TcpTransport.SocketStateServiceBase.CallbackSupport, ServiceBase.STARTING, ServiceBase.State, ServiceBase.STOPPING| Modifier and Type | Field and Description |
|---|---|
private SslTransport.ClientAuth |
clientAuth |
private java.lang.String |
disabledCypherSuites |
private java.lang.String |
enabledCipherSuites |
private javax.net.ssl.SSLEngine |
engine |
private java.nio.ByteBuffer |
readBuffer |
private java.nio.ByteBuffer |
readOverflowBuffer |
private boolean |
readUnderflow |
private SslTransport.SSLChannel |
ssl_channel |
private javax.net.ssl.SSLContext |
sslContext |
private java.nio.ByteBuffer |
writeBuffer |
private boolean |
writeFlushing |
blockingExecutor, channel, closeOnCancel, codec, dispatchQueue, drainOutboundSource, IPTOS_LOWCOST, IPTOS_LOWDELAY, IPTOS_RELIABILITY, IPTOS_THROUGHPUT, keepAlive, listener, localAddress, localhost, localLocation, maxReadRate, maxWriteRate, rateLimitingChannel, receiveBufferSize, rejectingOffers, remoteAddress, remoteLocation, sendBufferSize, socketState, trafficClass, useLocalHost, writeResumedForCodecFlush, yieldSource_serviceState, CREATED, STARTED, STOPPED| Constructor and Description |
|---|
SslTransport() |
| Modifier and Type | Method and Description |
|---|---|
void |
connected(java.nio.channels.SocketChannel channel) |
void |
connecting(java.net.URI remoteLocation,
java.net.URI localLocation) |
static SslTransport |
createTransport(java.net.URI uri)
Allows subclasses of TcpTransportFactory to create custom instances of
TcpTransport.
|
void |
drainInbound() |
void |
flush()
Forces a flush of any output buffers.
|
java.lang.String |
getClientAuth() |
java.lang.String |
getDisabledCypherSuites() |
java.lang.String |
getEnabledCypherSuites() |
java.security.cert.X509Certificate[] |
getPeerX509Certificates()
Gets the X509Certificate associated withe the peer.
|
java.nio.channels.ReadableByteChannel |
getReadChannel() |
javax.net.ssl.SSLSession |
getSSLSession() |
java.nio.channels.WritableByteChannel |
getWriteChannel() |
void |
handshake() |
protected void |
initializeChannel() |
protected void |
onConnected() |
static java.lang.String |
protocol(java.lang.String scheme)
Maps uri schemes to a protocol algorithm names.
|
private int |
secure_read(java.nio.ByteBuffer plain) |
private int |
secure_write(java.nio.ByteBuffer plain) |
void |
setClientAuth(java.lang.String clientAuth) |
void |
setDisabledCypherSuites(java.lang.String disabledCypherSuites) |
void |
setEnabledCypherSuites(java.lang.String enabledCypherSuites) |
void |
setSSLContext(javax.net.ssl.SSLContext ctx) |
private java.lang.String[] |
splitOnCommas(java.lang.String value) |
protected boolean |
transportFlush() |
_start, _stop, full, getBlockingExecutor, getDispatchQueue, getLocalAddress, getLocalHost, getMaxReadRate, getMaxWriteRate, getProtocolCodec, getReceiveBufferSize, getRemoteAddress, getSendBufferSize, getSocketChannel, getTrafficClass, getTransportListener, initializeCodec, isClosed, isCloseOnCancel, isConnected, isKeepAlive, isUseLocalHost, offer, onTransportFailure, resolveHostName, resumeRead, resumeWrite, setBlockingExecutor, setCloseOnCancel, setDispatchQueue, setKeepAlive, setMaxReadRate, setMaxWriteRate, setProtocolCodec, setReceiveBufferSize, setSendBufferSize, setTrafficClass, setTransportListener, setUseLocalHost, suspendRead, suspendWritegetServiceState, start, start, stop, stopprivate SslTransport.ClientAuth clientAuth
private java.lang.String disabledCypherSuites
private java.lang.String enabledCipherSuites
private javax.net.ssl.SSLContext sslContext
private javax.net.ssl.SSLEngine engine
private java.nio.ByteBuffer readBuffer
private boolean readUnderflow
private java.nio.ByteBuffer writeBuffer
private boolean writeFlushing
private java.nio.ByteBuffer readOverflowBuffer
private SslTransport.SSLChannel ssl_channel
public static java.lang.String protocol(java.lang.String scheme)
public void setSSLContext(javax.net.ssl.SSLContext ctx)
public static SslTransport createTransport(java.net.URI uri) throws java.lang.Exception
java.lang.Exceptionpublic javax.net.ssl.SSLSession getSSLSession()
public java.security.cert.X509Certificate[] getPeerX509Certificates()
SecuredSessiongetPeerX509Certificates in interface SecuredSessionpublic void connecting(java.net.URI remoteLocation,
java.net.URI localLocation)
throws java.lang.Exception
connecting in class TcpTransportjava.lang.Exceptionpublic void connected(java.nio.channels.SocketChannel channel)
throws java.lang.Exception
connected in class TcpTransportjava.lang.Exceptionprivate java.lang.String[] splitOnCommas(java.lang.String value)
protected void initializeChannel()
throws java.lang.Exception
initializeChannel in class TcpTransportjava.lang.Exceptionprotected void onConnected()
throws java.io.IOException
onConnected in class TcpTransportjava.io.IOExceptionpublic void flush()
Transportflush in interface Transportflush in class TcpTransportpublic void drainInbound()
drainInbound in interface TransportdrainInbound in class TcpTransportprotected boolean transportFlush()
throws java.io.IOException
transportFlush in class TcpTransportjava.io.IOExceptionprivate int secure_write(java.nio.ByteBuffer plain)
throws java.io.IOException
java.io.IOExceptionprivate int secure_read(java.nio.ByteBuffer plain)
throws java.io.IOException
java.io.IOExceptionpublic void handshake()
public java.nio.channels.ReadableByteChannel getReadChannel()
getReadChannel in interface TransportgetReadChannel in class TcpTransportpublic java.nio.channels.WritableByteChannel getWriteChannel()
getWriteChannel in interface TransportgetWriteChannel in class TcpTransportpublic java.lang.String getClientAuth()
public void setClientAuth(java.lang.String clientAuth)
public java.lang.String getDisabledCypherSuites()
public java.lang.String getEnabledCypherSuites()
public void setDisabledCypherSuites(java.lang.String disabledCypherSuites)
public void setEnabledCypherSuites(java.lang.String enabledCypherSuites)