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.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 void
awaitReadable()
void
awaitReadable(long time, java.util.concurrent.TimeUnit timeUnit)
org.xnio.XnioIoThread
getReadThread()
org.xnio.XnioWorker
getWorker()
boolean
isReadResumed()
boolean
isReadShutdown()
int
read(java.nio.ByteBuffer dst)
long
read(java.nio.ByteBuffer[] dsts, int offs, int len)
void
resumeReads()
void
setReadReadyHandler(org.xnio.conduits.ReadReadyHandler handler)
void
suspendReads()
void
terminateReads()
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
wakeupReads()
-
-
-
Method Detail
-
setReadReadyHandler
public void setReadReadyHandler(org.xnio.conduits.ReadReadyHandler handler)
- Specified by:
setReadReadyHandler
in interfaceorg.xnio.conduits.SourceConduit
-
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
-
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
-
terminateReads
public void terminateReads() throws java.io.IOException
- Specified by:
terminateReads
in interfaceorg.xnio.conduits.SourceConduit
- Throws:
java.io.IOException
-
getReadThread
public org.xnio.XnioIoThread getReadThread()
- Specified by:
getReadThread
in interfaceorg.xnio.conduits.SourceConduit
-
getWorker
public org.xnio.XnioWorker getWorker()
- Specified by:
getWorker
in interfaceorg.xnio.conduits.Conduit
-
-