org.xnio.conduits.Conduit, org.xnio.conduits.SinkConduit, org.xnio.conduits.StreamSinkConduitpublic 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 | 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 | Description |
|---|---|---|
protected |
AbstractFramedStreamSinkConduit(org.xnio.conduits.StreamSinkConduit next) |
Construct a new instance.
|
| Modifier and Type | Method | 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,
java.nio.ByteBuffer... data) |
Queues a frame for sending.
|
void |
terminateWrites() |
|
long |
transferFrom(java.nio.channels.FileChannel src,
long position,
long count) |
|
long |
transferFrom(org.xnio.channels.StreamSourceChannel source,
long count,
java.nio.ByteBuffer throughBuffer) |
|
void |
truncateWrites() |
|
int |
write(java.nio.ByteBuffer src) |
|
long |
write(java.nio.ByteBuffer[] srcs,
int offs,
int len) |
|
int |
writeFinal(java.nio.ByteBuffer src) |
|
long |
writeFinal(java.nio.ByteBuffer[] srcs,
int offs,
int len) |
awaitWritable, awaitWritable, flush, getWriteThread, isWriteResumed, isWriteShutdown, resumeWrites, setWriteReadyHandler, suspendWrites, wakeupWritesprotected AbstractFramedStreamSinkConduit(org.xnio.conduits.StreamSinkConduit next)
next - the delegate conduit to setprotected void queueFrame(AbstractFramedStreamSinkConduit.FrameCallBack callback, java.nio.ByteBuffer... data)
callback - data - public long transferFrom(java.nio.channels.FileChannel src,
long position,
long count)
throws java.io.IOException
transferFrom in interface org.xnio.conduits.StreamSinkConduittransferFrom in class org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>java.io.IOExceptionpublic long transferFrom(org.xnio.channels.StreamSourceChannel source,
long count,
java.nio.ByteBuffer throughBuffer)
throws java.io.IOException
transferFrom in interface org.xnio.conduits.StreamSinkConduittransferFrom in class org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>java.io.IOExceptionpublic int write(java.nio.ByteBuffer src)
throws java.io.IOException
write in interface org.xnio.conduits.StreamSinkConduitwrite in class org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>java.io.IOExceptionpublic long write(java.nio.ByteBuffer[] srcs,
int offs,
int len)
throws java.io.IOException
write in interface org.xnio.conduits.StreamSinkConduitwrite in class org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>java.io.IOExceptionpublic int writeFinal(java.nio.ByteBuffer src)
throws java.io.IOException
writeFinal in interface org.xnio.conduits.StreamSinkConduitwriteFinal in class org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>java.io.IOExceptionpublic long writeFinal(java.nio.ByteBuffer[] srcs,
int offs,
int len)
throws java.io.IOException
writeFinal in interface org.xnio.conduits.StreamSinkConduitwriteFinal in class org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>java.io.IOExceptionprotected long queuedDataLength()
public void terminateWrites()
throws java.io.IOException
terminateWrites in interface org.xnio.conduits.SinkConduitterminateWrites in class org.xnio.conduits.AbstractSinkConduit<org.xnio.conduits.StreamSinkConduit>java.io.IOExceptionprotected void doTerminateWrites()
throws java.io.IOException
java.io.IOExceptionprotected boolean flushQueuedData()
throws java.io.IOException
java.io.IOExceptionpublic void truncateWrites()
throws java.io.IOException
truncateWrites in interface org.xnio.conduits.SinkConduittruncateWrites in class org.xnio.conduits.AbstractSinkConduit<org.xnio.conduits.StreamSinkConduit>java.io.IOExceptionprotected boolean isWritesTerminated()
protected void queueCloseFrames()
protected void finished()
Copyright © 2018. All rights reserved.