Package org.restheart.handlers
Class ModifiableContentSinkConduit
java.lang.Object
org.xnio.conduits.AbstractConduit<org.xnio.conduits.StreamSinkConduit>
org.xnio.conduits.AbstractSinkConduit<org.xnio.conduits.StreamSinkConduit>
org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>
org.restheart.handlers.ModifiableContentSinkConduit
- All Implemented Interfaces:
org.xnio.conduits.Conduit,org.xnio.conduits.SinkConduit,org.xnio.conduits.StreamSinkConduit
public class ModifiableContentSinkConduit
extends org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>
A conduit that buffers data allowing to modify it.
It is also responsible of executing response interceptors. terminateWrites()
is called
- Author:
- Andrea Di Cesare <andrea@softinstigate.com>
-
Field Summary
Fields inherited from class org.xnio.conduits.AbstractConduit
next -
Constructor Summary
ConstructorsConstructorDescriptionModifiableContentSinkConduit(org.xnio.conduits.StreamSinkConduit next, io.undertow.server.HttpServerExchange exchange) Construct a new instance. -
Method Summary
Modifier and TypeMethodDescriptionvoidlongtransferFrom(FileChannel src, long position, long count) longtransferFrom(org.xnio.channels.StreamSourceChannel source, long count, ByteBuffer throughBuffer) intwrite(ByteBuffer src) longwrite(ByteBuffer[] dsts, int offs, int len) intwriteFinal(ByteBuffer src) longwriteFinal(ByteBuffer[] srcs, int offset, int length) Methods inherited from class org.xnio.conduits.AbstractSinkConduit
awaitWritable, awaitWritable, flush, getWriteThread, isWriteResumed, isWriteShutdown, resumeWrites, setWriteReadyHandler, suspendWrites, truncateWrites, wakeupWritesMethods inherited from class org.xnio.conduits.AbstractConduit
getWorkerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.xnio.conduits.Conduit
getWorkerMethods inherited from interface org.xnio.conduits.SinkConduit
awaitWritable, awaitWritable, flush, getWriteThread, isWriteResumed, isWriteShutdown, resumeWrites, setWriteReadyHandler, suspendWrites, truncateWrites, wakeupWrites
-
Constructor Details
-
ModifiableContentSinkConduit
public ModifiableContentSinkConduit(org.xnio.conduits.StreamSinkConduit next, io.undertow.server.HttpServerExchange exchange) Construct a new instance.- Parameters:
next- the delegate conduit to setexchange-
-
-
Method Details
-
write
- Specified by:
writein interfaceorg.xnio.conduits.StreamSinkConduit- Overrides:
writein classorg.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>- Throws:
IOException
-
write
- Specified by:
writein interfaceorg.xnio.conduits.StreamSinkConduit- Overrides:
writein classorg.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>- Throws:
IOException
-
transferFrom
- Specified by:
transferFromin interfaceorg.xnio.conduits.StreamSinkConduit- Overrides:
transferFromin classorg.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>- Throws:
IOException
-
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
-
writeFinal
- Specified by:
writeFinalin interfaceorg.xnio.conduits.StreamSinkConduit- Overrides:
writeFinalin classorg.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>- Throws:
IOException
-
writeFinal
- Specified by:
writeFinalin interfaceorg.xnio.conduits.StreamSinkConduit- Overrides:
writeFinalin classorg.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>- Throws:
IOException
-
terminateWrites
- Specified by:
terminateWritesin interfaceorg.xnio.conduits.SinkConduit- Overrides:
terminateWritesin classorg.xnio.conduits.AbstractSinkConduit<org.xnio.conduits.StreamSinkConduit>- Throws:
IOException
-