public class AbstractFramedStreamSinkConduit
extends org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>
When a write takes place all frames are attempted to be written out at once via a gathering write. Frames can be queued via queueFrame(io.undertow.conduits.AbstractFramedStreamSinkConduit.FrameCallBack, java.nio.ByteBuffer...)
.
Modifier and Type | Class and Description |
---|---|
static interface | AbstractFramedStreamSinkConduit.FrameCallBack Interface that is called when a frame event takes place. |
protected class | AbstractFramedStreamSinkConduit.PooledBufferFrameCallback |
protected class | AbstractFramedStreamSinkConduit.PooledBuffersFrameCallback |
Modifier | Constructor and Description |
---|---|
protected | AbstractFramedStreamSinkConduit(org.xnio.conduits.StreamSinkConduit next) Construct a new instance. |
Modifier and Type | Method and Description |
---|---|
protected void | doTerminateWrites() |
protected void | finished() |
protected boolean | flushQueuedData() |
protected boolean | isWritesTerminated() |
protected void | queueCloseFrames() |
protected long | queuedDataLength() |
protected void | queueFrame(AbstractFramedStreamSinkConduit.FrameCallBack callback, ByteBuffer... data) Queues a frame for sending. |
void | terminateWrites() |
long | transferFrom(FileChannel src, long position, long count) |
long | transferFrom(org.xnio.channels.StreamSourceChannel source, long count, ByteBuffer throughBuffer) |
void | truncateWrites() |
int | write(ByteBuffer src) |
long | write(ByteBuffer[] srcs, int offs, int len) |
int | writeFinal(ByteBuffer src) |
long | writeFinal(ByteBuffer[] srcs, int offs, int len) |
awaitWritable, awaitWritable, flush, getWriteThread, isWriteResumed, isWriteShutdown, resumeWrites, setWriteReadyHandler, suspendWrites, wakeupWrites
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
protected AbstractFramedStreamSinkConduit(org.xnio.conduits.StreamSinkConduit next)
next
- the delegate conduit to setprotected void queueFrame(AbstractFramedStreamSinkConduit.FrameCallBack callback, ByteBuffer... data)
callback
- data
- public long transferFrom(FileChannel src, long position, long count) throws IOException
transferFrom
in interface org.xnio.conduits.StreamSinkConduit
transferFrom
in class org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>
IOException
public long transferFrom(org.xnio.channels.StreamSourceChannel source, long count, ByteBuffer throughBuffer) throws IOException
transferFrom
in interface org.xnio.conduits.StreamSinkConduit
transferFrom
in class org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>
IOException
public int write(ByteBuffer src) throws IOException
write
in interface org.xnio.conduits.StreamSinkConduit
write
in class org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>
IOException
public long write(ByteBuffer[] srcs, int offs, int len) throws IOException
write
in interface org.xnio.conduits.StreamSinkConduit
write
in class org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>
IOException
public int writeFinal(ByteBuffer src) throws IOException
writeFinal
in interface org.xnio.conduits.StreamSinkConduit
writeFinal
in class org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>
IOException
public long writeFinal(ByteBuffer[] srcs, int offs, int len) throws IOException
writeFinal
in interface org.xnio.conduits.StreamSinkConduit
writeFinal
in class org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>
IOException
protected long queuedDataLength()
public void terminateWrites() throws IOException
terminateWrites
in interface org.xnio.conduits.SinkConduit
terminateWrites
in class org.xnio.conduits.AbstractSinkConduit<org.xnio.conduits.StreamSinkConduit>
IOException
protected void doTerminateWrites() throws IOException
IOException
protected boolean flushQueuedData() throws IOException
IOException
public void truncateWrites() throws IOException
truncateWrites
in interface org.xnio.conduits.SinkConduit
truncateWrites
in class org.xnio.conduits.AbstractSinkConduit<org.xnio.conduits.StreamSinkConduit>
IOException
protected boolean isWritesTerminated()
protected void queueCloseFrames()
protected void finished()
Copyright © 2015 JBoss by Red Hat. All rights reserved.