Package io.undertow.protocols.ssl
Class SslConduit
- java.lang.Object
-
- io.undertow.protocols.ssl.SslConduit
-
- All Implemented Interfaces:
org.xnio.conduits.Conduit,org.xnio.conduits.SinkConduit,org.xnio.conduits.SourceConduit,org.xnio.conduits.StreamSinkConduit,org.xnio.conduits.StreamSourceConduit
public class SslConduit extends java.lang.Object implements org.xnio.conduits.StreamSourceConduit, org.xnio.conduits.StreamSinkConduitConduit for SSL connections.- Author:
- Stuart Douglas, Flavia Rainone
-
-
Field Summary
Fields Modifier and Type Field Description static java.nio.ByteBufferEMPTY_BUFFERstatic intMAX_READ_LISTENER_INVOCATIONS
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidawaitReadable()voidawaitReadable(long time, java.util.concurrent.TimeUnit timeUnit)voidawaitWritable()voidawaitWritable(long time, java.util.concurrent.TimeUnit timeUnit)voidclose()forcibly closes the connectionbooleanflush()org.xnio.XnioIoThreadgetReadThread()javax.net.ssl.SSLEnginegetSSLEngine()javax.net.ssl.SSLSessiongetSslSession()org.xnio.XnioWorkergetWorker()org.xnio.XnioIoThreadgetWriteThread()booleanisReadResumed()booleanisReadShutdown()booleanisWriteResumed()booleanisWriteShutdown()intread(java.nio.ByteBuffer dst)longread(java.nio.ByteBuffer[] dsts, int offs, int len)voidresumeReads()voidresumeWrites()voidsetReadReadyHandler(org.xnio.conduits.ReadReadyHandler handler)voidsetSslEngine(javax.net.ssl.SSLEngine engine)voidsetWriteReadyHandler(org.xnio.conduits.WriteReadyHandler handler)voidstartHandshake()voidsuspendReads()voidsuspendWrites()voidterminateReads()voidterminateWrites()java.lang.StringtoString()longtransferFrom(java.nio.channels.FileChannel src, long position, long count)longtransferFrom(org.xnio.channels.StreamSourceChannel source, long count, java.nio.ByteBuffer throughBuffer)longtransferTo(long position, long count, java.nio.channels.FileChannel target)longtransferTo(long count, java.nio.ByteBuffer throughBuffer, org.xnio.channels.StreamSinkChannel target)voidtruncateWrites()voidwakeupReads()voidwakeupWrites()intwrite(java.nio.ByteBuffer src)longwrite(java.nio.ByteBuffer[] srcs, int offs, int len)intwriteFinal(java.nio.ByteBuffer src)longwriteFinal(java.nio.ByteBuffer[] srcs, int offset, int length)
-
-
-
Method Detail
-
terminateReads
public void terminateReads() throws java.io.IOException- Specified by:
terminateReadsin interfaceorg.xnio.conduits.SourceConduit- Throws:
java.io.IOException
-
isReadShutdown
public boolean isReadShutdown()
- Specified by:
isReadShutdownin interfaceorg.xnio.conduits.SourceConduit
-
resumeReads
public void resumeReads()
- Specified by:
resumeReadsin interfaceorg.xnio.conduits.SourceConduit
-
suspendReads
public void suspendReads()
- Specified by:
suspendReadsin interfaceorg.xnio.conduits.SourceConduit
-
wakeupReads
public void wakeupReads()
- Specified by:
wakeupReadsin interfaceorg.xnio.conduits.SourceConduit
-
isReadResumed
public boolean isReadResumed()
- Specified by:
isReadResumedin interfaceorg.xnio.conduits.SourceConduit
-
awaitReadable
public void awaitReadable() throws java.io.IOException- Specified by:
awaitReadablein interfaceorg.xnio.conduits.SourceConduit- Throws:
java.io.IOException
-
awaitReadable
public void awaitReadable(long time, java.util.concurrent.TimeUnit timeUnit) throws java.io.IOException- Specified by:
awaitReadablein interfaceorg.xnio.conduits.SourceConduit- Throws:
java.io.IOException
-
getReadThread
public org.xnio.XnioIoThread getReadThread()
- Specified by:
getReadThreadin interfaceorg.xnio.conduits.SourceConduit
-
setReadReadyHandler
public void setReadReadyHandler(org.xnio.conduits.ReadReadyHandler handler)
- Specified by:
setReadReadyHandlerin interfaceorg.xnio.conduits.SourceConduit
-
transferFrom
public long transferFrom(java.nio.channels.FileChannel src, long position, long count) throws java.io.IOException- Specified by:
transferFromin interfaceorg.xnio.conduits.StreamSinkConduit- Throws:
java.io.IOException
-
transferFrom
public long transferFrom(org.xnio.channels.StreamSourceChannel source, long count, java.nio.ByteBuffer throughBuffer) throws java.io.IOException- Specified by:
transferFromin interfaceorg.xnio.conduits.StreamSinkConduit- Throws:
java.io.IOException
-
write
public int write(java.nio.ByteBuffer src) throws java.io.IOException- Specified by:
writein interfaceorg.xnio.conduits.StreamSinkConduit- Throws:
java.io.IOException
-
write
public long write(java.nio.ByteBuffer[] srcs, int offs, int len) throws java.io.IOException- Specified by:
writein interfaceorg.xnio.conduits.StreamSinkConduit- Throws:
java.io.IOException
-
writeFinal
public int writeFinal(java.nio.ByteBuffer src) throws java.io.IOException- Specified by:
writeFinalin interfaceorg.xnio.conduits.StreamSinkConduit- Throws:
java.io.IOException
-
writeFinal
public long writeFinal(java.nio.ByteBuffer[] srcs, int offset, int length) throws java.io.IOException- Specified by:
writeFinalin interfaceorg.xnio.conduits.StreamSinkConduit- Throws:
java.io.IOException
-
terminateWrites
public void terminateWrites() throws java.io.IOException- Specified by:
terminateWritesin interfaceorg.xnio.conduits.SinkConduit- Throws:
java.io.IOException
-
isWriteShutdown
public boolean isWriteShutdown()
- Specified by:
isWriteShutdownin interfaceorg.xnio.conduits.SinkConduit
-
resumeWrites
public void resumeWrites()
- Specified by:
resumeWritesin interfaceorg.xnio.conduits.SinkConduit
-
suspendWrites
public void suspendWrites()
- Specified by:
suspendWritesin interfaceorg.xnio.conduits.SinkConduit
-
wakeupWrites
public void wakeupWrites()
- Specified by:
wakeupWritesin interfaceorg.xnio.conduits.SinkConduit
-
isWriteResumed
public boolean isWriteResumed()
- Specified by:
isWriteResumedin interfaceorg.xnio.conduits.SinkConduit
-
awaitWritable
public void awaitWritable() throws java.io.IOException- Specified by:
awaitWritablein interfaceorg.xnio.conduits.SinkConduit- Throws:
java.io.IOException
-
awaitWritable
public void awaitWritable(long time, java.util.concurrent.TimeUnit timeUnit) throws java.io.IOException- Specified by:
awaitWritablein interfaceorg.xnio.conduits.SinkConduit- Throws:
java.io.IOException
-
getWriteThread
public org.xnio.XnioIoThread getWriteThread()
- Specified by:
getWriteThreadin interfaceorg.xnio.conduits.SinkConduit
-
setWriteReadyHandler
public void setWriteReadyHandler(org.xnio.conduits.WriteReadyHandler handler)
- Specified by:
setWriteReadyHandlerin interfaceorg.xnio.conduits.SinkConduit
-
truncateWrites
public void truncateWrites() throws java.io.IOException- Specified by:
truncateWritesin interfaceorg.xnio.conduits.SinkConduit- Throws:
java.io.IOException
-
flush
public boolean flush() throws java.io.IOException- Specified by:
flushin interfaceorg.xnio.conduits.SinkConduit- Throws:
java.io.IOException
-
transferTo
public long transferTo(long position, long count, java.nio.channels.FileChannel target) throws java.io.IOException- Specified by:
transferToin interfaceorg.xnio.conduits.StreamSourceConduit- Throws:
java.io.IOException
-
transferTo
public long transferTo(long count, java.nio.ByteBuffer throughBuffer, org.xnio.channels.StreamSinkChannel target) throws java.io.IOException- Specified by:
transferToin interfaceorg.xnio.conduits.StreamSourceConduit- Throws:
java.io.IOException
-
read
public int read(java.nio.ByteBuffer dst) throws java.io.IOException- Specified by:
readin interfaceorg.xnio.conduits.StreamSourceConduit- Throws:
java.io.IOException
-
read
public long read(java.nio.ByteBuffer[] dsts, int offs, int len) throws java.io.IOException- Specified by:
readin interfaceorg.xnio.conduits.StreamSourceConduit- Throws:
java.io.IOException
-
getWorker
public org.xnio.XnioWorker getWorker()
- Specified by:
getWorkerin interfaceorg.xnio.conduits.Conduit
-
startHandshake
public void startHandshake() throws javax.net.ssl.SSLException- Throws:
javax.net.ssl.SSLException
-
getSslSession
public javax.net.ssl.SSLSession getSslSession()
-
getSSLEngine
public javax.net.ssl.SSLEngine getSSLEngine()
-
close
public void close()
forcibly closes the connection
-
setSslEngine
public void setSslEngine(javax.net.ssl.SSLEngine engine)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-