Package org.restheart.handlers
Class ContentStreamSinkConduit
java.lang.Object
org.xnio.conduits.AbstractConduit<D>
org.xnio.conduits.AbstractSinkConduit<D>
org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>
org.restheart.handlers.ContentStreamSinkConduit
- All Implemented Interfaces:
org.xnio.conduits.Conduit
,org.xnio.conduits.SinkConduit
,org.xnio.conduits.StreamSinkConduit
public class ContentStreamSinkConduit
extends org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>
conduit that executes response interceptors that don't require response
content; response interceptors that require response content are executed by
ModifiableContentSinkConduit.terminateWrites()
- Author:
- Andrea Di Cesare <[email protected]>
-
Field Summary
Fields inherited from class org.xnio.conduits.AbstractConduit
next
-
Constructor Summary
ConstructorsConstructorDescriptionContentStreamSinkConduit
(org.xnio.conduits.StreamSinkConduit next, io.undertow.server.HttpServerExchange exchange) Construct a new instance. -
Method Summary
Modifier and TypeMethodDescriptionvoid
long
transferFrom
(FileChannel src, long position, long count) long
transferFrom
(org.xnio.channels.StreamSourceChannel src, long count, ByteBuffer throughBuffer) int
write
(ByteBuffer src) long
write
(ByteBuffer[] dsts, int offs, int len) int
writeFinal
(ByteBuffer src) long
writeFinal
(ByteBuffer[] srcs, int offset, int length) Methods inherited from class org.xnio.conduits.AbstractSinkConduit
awaitWritable, awaitWritable, flush, getWriteThread, isWriteResumed, isWriteShutdown, resumeWrites, setWriteReadyHandler, suspendWrites, truncateWrites, wakeupWrites
Methods inherited from class org.xnio.conduits.AbstractConduit
getWorker
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.xnio.conduits.Conduit
getWorker
Methods inherited from interface org.xnio.conduits.SinkConduit
awaitWritable, awaitWritable, flush, getWriteThread, isWriteResumed, isWriteShutdown, resumeWrites, setWriteReadyHandler, suspendWrites, truncateWrites, wakeupWrites
-
Constructor Details
-
ContentStreamSinkConduit
public ContentStreamSinkConduit(org.xnio.conduits.StreamSinkConduit next, io.undertow.server.HttpServerExchange exchange) Construct a new instance.- Parameters:
next
-exchange
-
-
-
Method Details
-
write
- Specified by:
write
in interfaceorg.xnio.conduits.StreamSinkConduit
- Overrides:
write
in classorg.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>
- Throws:
IOException
-
write
- Specified by:
write
in interfaceorg.xnio.conduits.StreamSinkConduit
- Overrides:
write
in classorg.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>
- Throws:
IOException
-
transferFrom
- Specified by:
transferFrom
in interfaceorg.xnio.conduits.StreamSinkConduit
- Overrides:
transferFrom
in classorg.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>
- Throws:
IOException
-
transferFrom
public long transferFrom(org.xnio.channels.StreamSourceChannel src, long count, ByteBuffer throughBuffer) throws IOException - Specified by:
transferFrom
in interfaceorg.xnio.conduits.StreamSinkConduit
- Overrides:
transferFrom
in classorg.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>
- Throws:
IOException
-
writeFinal
- Specified by:
writeFinal
in interfaceorg.xnio.conduits.StreamSinkConduit
- Overrides:
writeFinal
in classorg.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>
- Throws:
IOException
-
writeFinal
- Specified by:
writeFinal
in interfaceorg.xnio.conduits.StreamSinkConduit
- Overrides:
writeFinal
in classorg.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>
- Throws:
IOException
-
terminateWrites
- Specified by:
terminateWrites
in interfaceorg.xnio.conduits.SinkConduit
- Overrides:
terminateWrites
in classorg.xnio.conduits.AbstractSinkConduit<org.xnio.conduits.StreamSinkConduit>
- Throws:
IOException
-