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 java.lang.Object implements org.xnio.conduits.StreamSourceConduitA 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, java.util.concurrent.TimeUnit timeUnit)org.xnio.XnioIoThreadgetReadThread()org.xnio.XnioWorkergetWorker()booleanisReadResumed()booleanisReadShutdown()intread(java.nio.ByteBuffer dst)longread(java.nio.ByteBuffer[] dsts, int offs, int len)voidresumeReads()voidsetReadReadyHandler(org.xnio.conduits.ReadReadyHandler handler)voidsuspendReads()voidterminateReads()longtransferTo(long position, long count, java.nio.channels.FileChannel target)longtransferTo(long count, java.nio.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, 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
-
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
-
terminateReads
public void terminateReads() throws java.io.IOException- Specified by:
terminateReadsin interfaceorg.xnio.conduits.SourceConduit- Throws:
java.io.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
-
-