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.StreamSinkConduit
- Author:
- Stuart Douglas
-
-
Field Summary
Fields Modifier and Type Field Description static java.nio.ByteBuffer
EMPTY_BUFFER
static int
MAX_READ_LISTENER_INVOCATIONS
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
awaitReadable()
void
awaitReadable(long time, java.util.concurrent.TimeUnit timeUnit)
void
awaitWritable()
void
awaitWritable(long time, java.util.concurrent.TimeUnit timeUnit)
void
close()
forcibly closes the connectionboolean
flush()
org.xnio.XnioIoThread
getReadThread()
javax.net.ssl.SSLEngine
getSSLEngine()
javax.net.ssl.SSLSession
getSslSession()
org.xnio.XnioWorker
getWorker()
org.xnio.XnioIoThread
getWriteThread()
boolean
isReadResumed()
boolean
isReadShutdown()
boolean
isWriteResumed()
boolean
isWriteShutdown()
int
read(java.nio.ByteBuffer dst)
long
read(java.nio.ByteBuffer[] dsts, int offs, int len)
void
resumeReads()
void
resumeWrites()
void
setReadReadyHandler(org.xnio.conduits.ReadReadyHandler handler)
void
setSslEngine(javax.net.ssl.SSLEngine engine)
void
setWriteReadyHandler(org.xnio.conduits.WriteReadyHandler handler)
void
startHandshake()
void
suspendReads()
void
suspendWrites()
void
terminateReads()
void
terminateWrites()
java.lang.String
toString()
long
transferFrom(java.nio.channels.FileChannel src, long position, long count)
long
transferFrom(org.xnio.channels.StreamSourceChannel source, long count, java.nio.ByteBuffer throughBuffer)
long
transferTo(long position, long count, java.nio.channels.FileChannel target)
long
transferTo(long count, java.nio.ByteBuffer throughBuffer, org.xnio.channels.StreamSinkChannel target)
void
truncateWrites()
void
wakeupReads()
void
wakeupWrites()
int
write(java.nio.ByteBuffer src)
long
write(java.nio.ByteBuffer[] srcs, int offs, int len)
int
writeFinal(java.nio.ByteBuffer src)
long
writeFinal(java.nio.ByteBuffer[] srcs, int offset, int length)
-
-
-
Method Detail
-
terminateReads
public void terminateReads() throws java.io.IOException
- Specified by:
terminateReads
in interfaceorg.xnio.conduits.SourceConduit
- Throws:
java.io.IOException
-
isReadShutdown
public boolean isReadShutdown()
- Specified by:
isReadShutdown
in interfaceorg.xnio.conduits.SourceConduit
-
resumeReads
public void resumeReads()
- Specified by:
resumeReads
in interfaceorg.xnio.conduits.SourceConduit
-
suspendReads
public void suspendReads()
- Specified by:
suspendReads
in interfaceorg.xnio.conduits.SourceConduit
-
wakeupReads
public void wakeupReads()
- Specified by:
wakeupReads
in interfaceorg.xnio.conduits.SourceConduit
-
isReadResumed
public boolean isReadResumed()
- Specified by:
isReadResumed
in interfaceorg.xnio.conduits.SourceConduit
-
awaitReadable
public void awaitReadable() throws java.io.IOException
- Specified by:
awaitReadable
in 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:
awaitReadable
in interfaceorg.xnio.conduits.SourceConduit
- Throws:
java.io.IOException
-
getReadThread
public org.xnio.XnioIoThread getReadThread()
- Specified by:
getReadThread
in interfaceorg.xnio.conduits.SourceConduit
-
setReadReadyHandler
public void setReadReadyHandler(org.xnio.conduits.ReadReadyHandler handler)
- Specified by:
setReadReadyHandler
in interfaceorg.xnio.conduits.SourceConduit
-
transferFrom
public long transferFrom(java.nio.channels.FileChannel src, long position, long count) throws java.io.IOException
- Specified by:
transferFrom
in 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:
transferFrom
in interfaceorg.xnio.conduits.StreamSinkConduit
- Throws:
java.io.IOException
-
write
public int write(java.nio.ByteBuffer src) throws java.io.IOException
- Specified by:
write
in 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:
write
in interfaceorg.xnio.conduits.StreamSinkConduit
- Throws:
java.io.IOException
-
writeFinal
public int writeFinal(java.nio.ByteBuffer src) throws java.io.IOException
- Specified by:
writeFinal
in 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:
writeFinal
in interfaceorg.xnio.conduits.StreamSinkConduit
- Throws:
java.io.IOException
-
terminateWrites
public void terminateWrites() throws java.io.IOException
- Specified by:
terminateWrites
in interfaceorg.xnio.conduits.SinkConduit
- Throws:
java.io.IOException
-
isWriteShutdown
public boolean isWriteShutdown()
- Specified by:
isWriteShutdown
in interfaceorg.xnio.conduits.SinkConduit
-
resumeWrites
public void resumeWrites()
- Specified by:
resumeWrites
in interfaceorg.xnio.conduits.SinkConduit
-
suspendWrites
public void suspendWrites()
- Specified by:
suspendWrites
in interfaceorg.xnio.conduits.SinkConduit
-
wakeupWrites
public void wakeupWrites()
- Specified by:
wakeupWrites
in interfaceorg.xnio.conduits.SinkConduit
-
isWriteResumed
public boolean isWriteResumed()
- Specified by:
isWriteResumed
in interfaceorg.xnio.conduits.SinkConduit
-
awaitWritable
public void awaitWritable() throws java.io.IOException
- Specified by:
awaitWritable
in 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:
awaitWritable
in interfaceorg.xnio.conduits.SinkConduit
- Throws:
java.io.IOException
-
getWriteThread
public org.xnio.XnioIoThread getWriteThread()
- Specified by:
getWriteThread
in interfaceorg.xnio.conduits.SinkConduit
-
setWriteReadyHandler
public void setWriteReadyHandler(org.xnio.conduits.WriteReadyHandler handler)
- Specified by:
setWriteReadyHandler
in interfaceorg.xnio.conduits.SinkConduit
-
truncateWrites
public void truncateWrites() throws java.io.IOException
- Specified by:
truncateWrites
in interfaceorg.xnio.conduits.SinkConduit
- Throws:
java.io.IOException
-
flush
public boolean flush() throws java.io.IOException
- Specified by:
flush
in 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:
transferTo
in 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:
transferTo
in interfaceorg.xnio.conduits.StreamSourceConduit
- Throws:
java.io.IOException
-
read
public int read(java.nio.ByteBuffer dst) throws java.io.IOException
- Specified by:
read
in 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:
read
in interfaceorg.xnio.conduits.StreamSourceConduit
- Throws:
java.io.IOException
-
getWorker
public org.xnio.XnioWorker getWorker()
- Specified by:
getWorker
in 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:
toString
in classjava.lang.Object
-
-