Top Description Fields Constructors Methods
org.glassfish.grizzly.http2

public Class Http2SessionOutputSink

extends Object
Class Inheritance
Imports
java.util.LinkedList, .List, java.util.concurrent.atomic.AtomicBoolean, .AtomicInteger, java.util.concurrent.locks.LockSupport, java.util.logging.Level, .Logger, org.glassfish.grizzly.Buffer, .CompletionHandler, .Grizzly, .WriteHandler, .WriteResult, org.glassfish.grizzly.asyncqueue.MessageCloner, .TaskQueue, org.glassfish.grizzly.http2.frames.DataFrame, .ErrorCode, .Http2Frame

Class represents an output sink associated with specific Http2Session and is responsible for session (connection) level flow control.
Author
Alexey Stashok

Field Summary

Modifier and TypeField and Description
private final AtomicInteger
protected final Http2Session
private static final Logger
private static final int
private static final int
private final TaskQueue<Http2OutputQueueRecord>
private final List<Http2Frame>
private final AtomicBoolean

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected boolean
public void
private void
protected Http2FrameCodec
protected int
protected void
notifyCanWrite(final WriteHandler writeHandler)

protected void
onPeerWindowUpdate(final int delta)

protected void
writeDataDownStream(final Http2Stream stream, final List<Http2Frame> headerFrames, Buffer data, final CompletionHandler<WriteResult<K, L>> completionHandler, final MessageCloner<Buffer> messageCloner, final boolean isLast)

protected void
protected void
protected <K> void
writeDownStream(final K anyMessage, final CompletionHandler<WriteResult<K, L>> completionHandler, final MessageCloner<Buffer> messageCloner)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

availConnectionWindowSizeback to summary
private final AtomicInteger availConnectionWindowSize
http2Sessionback to summary
protected final Http2Session http2Session
LOGGERback to summary
private static final Logger LOGGER
MAX_FRAME_PAYLOAD_SIZEback to summary
private static final int MAX_FRAME_PAYLOAD_SIZE
MAX_OUTPUT_QUEUE_SIZEback to summary
private static final int MAX_OUTPUT_QUEUE_SIZE
outputQueueback to summary
private final TaskQueue<Http2OutputQueueRecord> outputQueue
tmpFramesListback to summary
private final List<Http2Frame> tmpFramesList
writerLockback to summary
private final AtomicBoolean writerLock

Constructor Detail

Http2SessionOutputSinkback to summary
public Http2SessionOutputSink(Http2Session session)

Method Detail

canWriteback to summary
protected boolean canWrite()
closeback to summary
public void close()
flushOutputQueueback to summary
private void flushOutputQueue()
frameCodecback to summary
protected Http2FrameCodec frameCodec()
getAvailablePeerConnectionWindowSizeback to summary
protected int getAvailablePeerConnectionWindowSize()
notifyCanWriteback to summary
protected void notifyCanWrite(final WriteHandler writeHandler)
onPeerWindowUpdateback to summary
protected void onPeerWindowUpdate(final int delta) throws Http2SessionException
writeDataDownStreamback to summary
protected void writeDataDownStream(final Http2Stream stream, final List<Http2Frame> headerFrames, Buffer data, final CompletionHandler<WriteResult<K, L>> completionHandler, final MessageCloner<Buffer> messageCloner, final boolean isLast)
writeDownStreamback to summary
protected void writeDownStream(final Http2Frame frame)
writeDownStreamback to summary
protected void writeDownStream(final List<Http2Frame> frames)
writeDownStreamback to summary
protected <K> void writeDownStream(final K anyMessage, final CompletionHandler<WriteResult<K, L>> completionHandler, final MessageCloner<Buffer> messageCloner)
Annotations
@SuppressWarnings:unchecked