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 static class | AbstractFramedStreamSinkConduit.PooledBufferFrameCallback |
protected static 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, wakeupWritesclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitprotected 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.StreamSinkConduittransferFrom in class org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>IOExceptionpublic long transferFrom(org.xnio.channels.StreamSourceChannel source,
long count,
ByteBuffer throughBuffer)
throws IOException transferFrom in interface org.xnio.conduits.StreamSinkConduittransferFrom in class org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>IOExceptionpublic int write(ByteBuffer src) throws IOException
write in interface org.xnio.conduits.StreamSinkConduitwrite in class org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>IOExceptionpublic long write(ByteBuffer[] srcs, int offs, int len) throws IOException
write in interface org.xnio.conduits.StreamSinkConduitwrite in class org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>IOExceptionpublic int writeFinal(ByteBuffer src) throws IOException
writeFinal in interface org.xnio.conduits.StreamSinkConduitwriteFinal in class org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>IOExceptionpublic long writeFinal(ByteBuffer[] srcs, int offs, int len) throws IOException
writeFinal in interface org.xnio.conduits.StreamSinkConduitwriteFinal in class org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>IOExceptionprotected long queuedDataLength()
public void terminateWrites()
throws IOException terminateWrites in interface org.xnio.conduits.SinkConduitterminateWrites in class org.xnio.conduits.AbstractSinkConduit<org.xnio.conduits.StreamSinkConduit>IOExceptionprotected void doTerminateWrites()
throws IOException IOExceptionprotected boolean flushQueuedData()
throws IOException IOExceptionpublic void truncateWrites()
throws IOException truncateWrites in interface org.xnio.conduits.SinkConduittruncateWrites in class org.xnio.conduits.AbstractSinkConduit<org.xnio.conduits.StreamSinkConduit>IOExceptionprotected boolean isWritesTerminated()
protected void queueCloseFrames()
protected void finished()
Copyright © 2020 JBoss by Red Hat. All rights reserved.