Top Inners Fields Constructors Methods
org.eclipse.jetty.http2.internal

public Class HTTP2Flusher

extends IteratingCallback
implements Dumpable
Class Inheritance
All Implemented Interfaces
org.eclipse.jetty.util.component.Dumpable
Imports
java.io.IOException, java.nio.ByteBuffer, java.util.ArrayDeque, .ArrayList, .Collection, .Deque, .HashSet, .Iterator, .List, .Queue, .Set, org.eclipse.jetty.http2.FlowControlStrategy, .HTTP2Session, .HTTP2Stream, org.eclipse.jetty.http2.frames.WindowUpdateFrame, org.eclipse.jetty.http2.hpack.HpackException, org.eclipse.jetty.io.ByteBufferPool, .EofException, org.eclipse.jetty.util.IteratingCallback, org.eclipse.jetty.util.component.Dumpable, org.eclipse.jetty.util.thread.AutoLock, .Invocable, org.slf4j.Logger, .LoggerFactory

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class

Field Summary

Modifier and TypeField and Description
private final ByteBufferPool.Accumulator
private static final ByteBuffer[]
private final Deque<HTTP2Session.Entry>
private Invocable.InvocationType
private final AutoLock
private static final Logger
private final Queue<HTTP2Session.Entry>
private final Collection<HTTP2Session.Entry>
private final HTTP2Session
private HTTP2Session.Entry
private Throwable
private final Queue<HTTP2Flusher.WindowEntry>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean
public boolean
private void
public String
public void
dump(Appendable
The appendable to dump to
out
,
String
The indent to apply after any new lines.
indent
)

Implements org.eclipse.jetty.util.component.Dumpable.dump.

Dump this object (and children) into an Appendable using the provided indent after any new lines.

private void
public int
public Invocable.InvocationType
private int
protected void
onCompleteFailure(Throwable
the throwable to indicate cause of failure
x
)

Overrides org.eclipse.jetty.util.IteratingCallback.onCompleteFailure.

Invoked when the overall task has completed with a failure.

protected void
onCompleteSuccess()

Overrides org.eclipse.jetty.util.IteratingCallback.onCompleteSuccess.

Invoked when the overall task has completed successfully.

public void
onFlushed(long bytes)

public boolean
protected IteratingCallback.Action
process()

Implements abstract org.eclipse.jetty.util.IteratingCallback.process.

Method called by iterate() to process the asynchronous sub-task.

public void
succeeded()

Overrides org.eclipse.jetty.util.IteratingCallback.succeeded.

Overrides default org.eclipse.jetty.util.Callback.succeeded.

Method to invoke when the asynchronous sub-task succeeds.

public void
public String
toString()

Overrides org.eclipse.jetty.util.IteratingCallback.toString.

Returns a string representation of the object.

public void
Inherited from org.eclipse.jetty.util.IteratingCallback:
abortclosefailedisAbortedisClosedisFailedisSucceedediteratereset

Field Detail

accumulatorback to summary
private final ByteBufferPool.Accumulator accumulator
EMPTY_BYTE_BUFFERSback to summary
private static final ByteBuffer[] EMPTY_BYTE_BUFFERS
entriesback to summary
private final Deque<HTTP2Session.Entry> entries
invocationTypeback to summary
private Invocable.InvocationType invocationType
lockback to summary
private final AutoLock lock
LOGback to summary
private static final Logger LOG
pendingEntriesback to summary
private final Queue<HTTP2Session.Entry> pendingEntries
processedEntriesback to summary
private final Collection<HTTP2Session.Entry> processedEntries
sessionback to summary
private final HTTP2Session session
stalledEntryback to summary
private HTTP2Session.Entry stalledEntry
terminatedback to summary
private Throwable terminated
windowsback to summary
private final Queue<HTTP2Flusher.WindowEntry> windows

Constructor Detail

HTTP2Flusherback to summary
public HTTP2Flusher(HTTP2Session session)

Method Detail

appendback to summary
public boolean append(HTTP2Session.Entry entry)
appendback to summary
public boolean append(List<HTTP2Session.Entry> list)
closedback to summary
private void closed(HTTP2Session.Entry entry, Throwable failure)
dumpback to summary
public String dump()

Overrides default org.eclipse.jetty.util.component.Dumpable.dump.

Annotations
@Override
dumpback to summary
public void dump(Appendable out, String indent) throws IOException

Implements org.eclipse.jetty.util.component.Dumpable.dump.

Doc from org.eclipse.jetty.util.component.Dumpable.dump.

Dump this object (and children) into an Appendable using the provided indent after any new lines. The indent should not be applied to the first object dumped.

Parameters
out:Appendable

The appendable to dump to

indent:String

The indent to apply after any new lines.

Annotations
@Override
Exceptions
IOException:
if unable to write to Appendable
finishback to summary
private void finish()
getFrameQueueSizeback to summary
public int getFrameQueueSize()
getInvocationTypeback to summary
public Invocable.InvocationType getInvocationType()

Overrides default org.eclipse.jetty.util.thread.Invocable.getInvocationType.

Returns:Invocable.InvocationType

Doc from org.eclipse.jetty.util.thread.Invocable.getInvocationType.

The InvocationType of this object

Annotations
@Override
getWindowQueueSizeback to summary
private int getWindowQueueSize()
onCompleteFailureback to summary
protected void onCompleteFailure(Throwable x)

Overrides org.eclipse.jetty.util.IteratingCallback.onCompleteFailure.

Doc from org.eclipse.jetty.util.IteratingCallback.onCompleteFailure.

Invoked when the overall task has completed with a failure.

Parameters
x:Throwable

the throwable to indicate cause of failure

Annotations
@Override
onCompleteSuccessback to summary
protected void onCompleteSuccess()

Overrides org.eclipse.jetty.util.IteratingCallback.onCompleteSuccess.

Doc from org.eclipse.jetty.util.IteratingCallback.onCompleteSuccess.

Invoked when the overall task has completed successfully.

Annotations
@Override
onFlushedback to summary
public void onFlushed(long bytes) throws IOException
prependback to summary
public boolean prepend(HTTP2Session.Entry entry)
processback to summary
protected IteratingCallback.Action process() throws Throwable

Implements abstract org.eclipse.jetty.util.IteratingCallback.process.

Doc from org.eclipse.jetty.util.IteratingCallback.process.

Method called by iterate() to process the asynchronous sub-task.

Implementations must initiate the asynchronous execution of the sub-task (if any) and return an appropriate action:

  • Action#IDLE when no sub tasks are available for execution but the overall job is not completed yet
  • Action#SCHEDULED when the sub task asynchronous execution has been started
  • Action#SUCCEEDED when the overall job is completed
Returns:IteratingCallback.Action

the appropriate Action

Annotations
@Override
Exceptions
Throwable:
if the sub-task processing throws
succeededback to summary
public void succeeded()

Overrides org.eclipse.jetty.util.IteratingCallback.succeeded.

Overrides default org.eclipse.jetty.util.Callback.succeeded.

Doc from org.eclipse.jetty.util.IteratingCallback.succeeded.

Method to invoke when the asynchronous sub-task succeeds.

Subclasses that override this method must always remember to call super.succeeded().

Annotations
@Override
terminateback to summary
public void terminate(Throwable cause)
toStringback to summary
public String toString()

Overrides org.eclipse.jetty.util.IteratingCallback.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override
windowback to summary
public void window(HTTP2Stream stream, WindowUpdateFrame frame)
org.eclipse.jetty.http2.internal back to summary

private Class HTTP2Flusher.WindowEntry

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final WindowUpdateFrame
private final HTTP2Stream

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

frameback to summary
private final WindowUpdateFrame frame
streamback to summary
private final HTTP2Stream stream

Constructor Detail

WindowEntryback to summary
public WindowEntry(HTTP2Stream stream, WindowUpdateFrame frame)

Method Detail

performback to summary
public void perform()