Package io.undertow.conduits
Class EmptyStreamSourceConduit
- java.lang.Object
-
- io.undertow.conduits.EmptyStreamSourceConduit
-
- All Implemented Interfaces:
org.xnio.conduits.Conduit,org.xnio.conduits.SourceConduit,org.xnio.conduits.StreamSourceConduit
public final class EmptyStreamSourceConduit extends Object implements org.xnio.conduits.StreamSourceConduit
A stream source conduit which is always empty. Temporary copy from XNIO, see https://issues.jboss.org/browse/XNIO-199- Author:
- David M. Lloyd
-
-
Constructor Summary
Constructors Constructor Description EmptyStreamSourceConduit(org.xnio.XnioIoThread readThread)Construct a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidawaitReadable()voidawaitReadable(long time, TimeUnit timeUnit)org.xnio.XnioIoThreadgetReadThread()org.xnio.XnioWorkergetWorker()booleanisReadResumed()booleanisReadShutdown()intread(ByteBuffer dst)longread(ByteBuffer[] dsts, int offs, int len)voidresumeReads()voidsetReadReadyHandler(org.xnio.conduits.ReadReadyHandler handler)voidsuspendReads()voidterminateReads()longtransferTo(long position, long count, FileChannel target)longtransferTo(long count, ByteBuffer throughBuffer, org.xnio.channels.StreamSinkChannel target)voidwakeupReads()
-
-
-
Method Detail
-
setReadReadyHandler
public void setReadReadyHandler(org.xnio.conduits.ReadReadyHandler handler)
- Specified by:
setReadReadyHandlerin interfaceorg.xnio.conduits.SourceConduit
-
transferTo
public long transferTo(long position, long count, FileChannel target) throws IOException- Specified by:
transferToin interfaceorg.xnio.conduits.StreamSourceConduit- Throws:
IOException
-
transferTo
public long transferTo(long count, ByteBuffer throughBuffer, org.xnio.channels.StreamSinkChannel target) throws IOException- Specified by:
transferToin interfaceorg.xnio.conduits.StreamSourceConduit- Throws:
IOException
-
read
public int read(ByteBuffer dst) throws IOException
- Specified by:
readin interfaceorg.xnio.conduits.StreamSourceConduit- Throws:
IOException
-
read
public long read(ByteBuffer[] dsts, int offs, int len) throws IOException
- Specified by:
readin interfaceorg.xnio.conduits.StreamSourceConduit- Throws:
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 IOException- Specified by:
awaitReadablein interfaceorg.xnio.conduits.SourceConduit- Throws:
IOException
-
awaitReadable
public void awaitReadable(long time, TimeUnit timeUnit) throws IOException- Specified by:
awaitReadablein interfaceorg.xnio.conduits.SourceConduit- Throws:
IOException
-
terminateReads
public void terminateReads() throws IOException- Specified by:
terminateReadsin interfaceorg.xnio.conduits.SourceConduit- Throws:
IOException
-
getReadThread
public org.xnio.XnioIoThread getReadThread()
- Specified by:
getReadThreadin interfaceorg.xnio.conduits.SourceConduit
-
getWorker
public org.xnio.XnioWorker getWorker()
- Specified by:
getWorkerin interfaceorg.xnio.conduits.Conduit
-
-