public abstract class FixedPayloadFrameSourceChannel extends StreamSourceFrameChannel
type
Modifier | Constructor and Description |
---|---|
protected |
FixedPayloadFrameSourceChannel(WebSocketChannel wsChannel,
WebSocketFrameType type,
long payloadSize,
int rsv,
boolean finalFragment,
org.xnio.Pooled<ByteBuffer> pooled,
long frameLength,
ChannelFunction... functions) |
Modifier and Type | Method and Description |
---|---|
protected void |
afterRead(ByteBuffer buffer,
int position,
int length)
Called after data was read into the
ByteBuffer |
protected void |
handleHeaderData(FrameHeaderData headerData) |
int |
read(ByteBuffer dst) |
long |
read(ByteBuffer[] dsts) |
long |
read(ByteBuffer[] dsts,
int offset,
int length) |
long |
transferTo(long count,
ByteBuffer throughBuffer,
org.xnio.channels.StreamSinkChannel target) |
long |
transferTo(long position,
long count,
FileChannel target) |
discard, finalFrame, getFramedChannel, getRsv, getType, getWebSocketChannel, isFinalFragment
awaitReadable, awaitReadable, close, complete, getCloseSetter, getIoThread, getOption, getReadFrameCount, getReadSetter, getReadThread, getWorker, isComplete, isOpen, isReadResumed, lastFrame, resumeReads, setOption, shutdownReads, supportsOption, suspendReads, wakeupReads
protected FixedPayloadFrameSourceChannel(WebSocketChannel wsChannel, WebSocketFrameType type, long payloadSize, int rsv, boolean finalFragment, org.xnio.Pooled<ByteBuffer> pooled, long frameLength, ChannelFunction... functions)
protected void handleHeaderData(FrameHeaderData headerData)
public final long transferTo(long position, long count, FileChannel target) throws IOException
transferTo
in interface org.xnio.channels.StreamSourceChannel
transferTo
in class AbstractFramedStreamSourceChannel<WebSocketChannel,StreamSourceFrameChannel,StreamSinkFrameChannel>
IOException
public final long transferTo(long count, ByteBuffer throughBuffer, org.xnio.channels.StreamSinkChannel target) throws IOException
transferTo
in interface org.xnio.channels.StreamSourceChannel
transferTo
in class AbstractFramedStreamSourceChannel<WebSocketChannel,StreamSourceFrameChannel,StreamSinkFrameChannel>
IOException
public int read(ByteBuffer dst) throws IOException
read
in interface ReadableByteChannel
read
in class AbstractFramedStreamSourceChannel<WebSocketChannel,StreamSourceFrameChannel,StreamSinkFrameChannel>
IOException
public final long read(ByteBuffer[] dsts) throws IOException
read
in interface ScatteringByteChannel
read
in class AbstractFramedStreamSourceChannel<WebSocketChannel,StreamSourceFrameChannel,StreamSinkFrameChannel>
IOException
public long read(ByteBuffer[] dsts, int offset, int length) throws IOException
read
in interface ScatteringByteChannel
read
in class AbstractFramedStreamSourceChannel<WebSocketChannel,StreamSourceFrameChannel,StreamSinkFrameChannel>
IOException
protected void afterRead(ByteBuffer buffer, int position, int length) throws IOException
ByteBuffer
buffer
- the ByteBuffer
into which the data was readposition
- the position it was written tolength
- the number of bytes there were writtenIOException
- thrown if an error occursCopyright © 2014 JBoss by Red Hat. All rights reserved.