Package io.undertow.conduits
Class StoredResponseStreamSinkConduit
- java.lang.Object
-
- org.xnio.conduits.AbstractConduit<D>
-
- org.xnio.conduits.AbstractSinkConduit<D>
-
- org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>
-
- io.undertow.conduits.StoredResponseStreamSinkConduit
-
- All Implemented Interfaces:
org.xnio.conduits.Conduit,org.xnio.conduits.SinkConduit,org.xnio.conduits.StreamSinkConduit
public final class StoredResponseStreamSinkConduit extends org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>- Author:
- Stuart Douglas
-
-
Field Summary
Fields Modifier and Type Field Description static AttachmentKey<byte[]>RESPONSE
-
Constructor Summary
Constructors Constructor Description StoredResponseStreamSinkConduit(org.xnio.conduits.StreamSinkConduit next, HttpServerExchange exchange)Construct a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidterminateWrites()longtransferFrom(FileChannel src, long position, long count)longtransferFrom(org.xnio.channels.StreamSourceChannel source, long count, ByteBuffer throughBuffer)intwrite(ByteBuffer src)longwrite(ByteBuffer[] srcs, int offs, int len)intwriteFinal(ByteBuffer src)longwriteFinal(ByteBuffer[] srcs, int offs, int len)-
Methods inherited from class org.xnio.conduits.AbstractSinkConduit
awaitWritable, awaitWritable, flush, getWriteThread, isWriteResumed, isWriteShutdown, resumeWrites, setWriteReadyHandler, suspendWrites, truncateWrites, wakeupWrites
-
-
-
-
Field Detail
-
RESPONSE
public static final AttachmentKey<byte[]> RESPONSE
-
-
Constructor Detail
-
StoredResponseStreamSinkConduit
public StoredResponseStreamSinkConduit(org.xnio.conduits.StreamSinkConduit next, HttpServerExchange exchange)Construct a new instance.- Parameters:
next- the delegate conduit to setexchange-
-
-
Method Detail
-
transferFrom
public long transferFrom(org.xnio.channels.StreamSourceChannel source, long count, ByteBuffer throughBuffer) throws IOException- Specified by:
transferFromin interfaceorg.xnio.conduits.StreamSinkConduit- Overrides:
transferFromin classorg.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>- Throws:
IOException
-
transferFrom
public long transferFrom(FileChannel src, long position, long count) throws IOException
- Specified by:
transferFromin interfaceorg.xnio.conduits.StreamSinkConduit- Overrides:
transferFromin classorg.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>- Throws:
IOException
-
write
public int write(ByteBuffer src) throws IOException
- Specified by:
writein interfaceorg.xnio.conduits.StreamSinkConduit- Overrides:
writein classorg.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>- Throws:
IOException
-
write
public long write(ByteBuffer[] srcs, int offs, int len) throws IOException
- Specified by:
writein interfaceorg.xnio.conduits.StreamSinkConduit- Overrides:
writein classorg.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>- Throws:
IOException
-
writeFinal
public int writeFinal(ByteBuffer src) throws IOException
- Specified by:
writeFinalin interfaceorg.xnio.conduits.StreamSinkConduit- Overrides:
writeFinalin classorg.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>- Throws:
IOException
-
writeFinal
public long writeFinal(ByteBuffer[] srcs, int offs, int len) throws IOException
- Specified by:
writeFinalin interfaceorg.xnio.conduits.StreamSinkConduit- Overrides:
writeFinalin classorg.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>- Throws:
IOException
-
terminateWrites
public void terminateWrites() throws IOException- Specified by:
terminateWritesin interfaceorg.xnio.conduits.SinkConduit- Overrides:
terminateWritesin classorg.xnio.conduits.AbstractSinkConduit<org.xnio.conduits.StreamSinkConduit>- Throws:
IOException
-
-