Package org.eclipse.jetty.http2
Class HTTP2Flusher
- java.lang.Object
-
- org.eclipse.jetty.util.IteratingCallback
-
- org.eclipse.jetty.http2.HTTP2Flusher
-
- All Implemented Interfaces:
org.eclipse.jetty.util.Callback
,org.eclipse.jetty.util.component.Dumpable
,org.eclipse.jetty.util.thread.Invocable
public class HTTP2Flusher extends org.eclipse.jetty.util.IteratingCallback implements org.eclipse.jetty.util.component.Dumpable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
HTTP2Flusher.Entry
private class
HTTP2Flusher.WindowEntry
-
Nested classes/interfaces inherited from class org.eclipse.jetty.util.IteratingCallback
org.eclipse.jetty.util.IteratingCallback.Action
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.Callback
org.eclipse.jetty.util.Callback.Completable, org.eclipse.jetty.util.Callback.Completing, org.eclipse.jetty.util.Callback.Nested
-
-
Field Summary
Fields Modifier and Type Field Description private static java.nio.ByteBuffer[]
EMPTY_BYTE_BUFFERS
private java.util.Deque<HTTP2Flusher.Entry>
entries
private org.eclipse.jetty.util.thread.Invocable.InvocationType
invocationType
private org.eclipse.jetty.io.ByteBufferPool.Lease
lease
private static org.eclipse.jetty.util.log.Logger
LOG
private java.util.Queue<HTTP2Flusher.Entry>
pendingEntries
private java.util.Collection<HTTP2Flusher.Entry>
processedEntries
private HTTP2Session
session
private HTTP2Flusher.Entry
stalledEntry
private java.lang.Throwable
terminated
private java.util.Queue<HTTP2Flusher.WindowEntry>
windows
-
Constructor Summary
Constructors Constructor Description HTTP2Flusher(HTTP2Session session)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
append(java.util.List<HTTP2Flusher.Entry> list)
boolean
append(HTTP2Flusher.Entry entry)
private void
closed(HTTP2Flusher.Entry entry, java.lang.Throwable failure)
java.lang.String
dump()
void
dump(java.lang.Appendable out, java.lang.String indent)
private void
finish()
int
getFrameQueueSize()
org.eclipse.jetty.util.thread.Invocable.InvocationType
getInvocationType()
private int
getWindowQueueSize()
protected void
onCompleteFailure(java.lang.Throwable x)
protected void
onCompleteSuccess()
(package private) void
onFlushed(long bytes)
boolean
prepend(HTTP2Flusher.Entry entry)
protected org.eclipse.jetty.util.IteratingCallback.Action
process()
void
succeeded()
(package private) void
terminate(java.lang.Throwable cause)
java.lang.String
toString()
void
window(IStream stream, WindowUpdateFrame frame)
-
Methods inherited from class org.eclipse.jetty.util.IteratingCallback
close, failed, isClosed, isFailed, isSucceeded, iterate, reset
-
-
-
-
Field Detail
-
LOG
private static final org.eclipse.jetty.util.log.Logger LOG
-
EMPTY_BYTE_BUFFERS
private static final java.nio.ByteBuffer[] EMPTY_BYTE_BUFFERS
-
windows
private final java.util.Queue<HTTP2Flusher.WindowEntry> windows
-
entries
private final java.util.Deque<HTTP2Flusher.Entry> entries
-
pendingEntries
private final java.util.Queue<HTTP2Flusher.Entry> pendingEntries
-
processedEntries
private final java.util.Collection<HTTP2Flusher.Entry> processedEntries
-
session
private final HTTP2Session session
-
lease
private final org.eclipse.jetty.io.ByteBufferPool.Lease lease
-
invocationType
private org.eclipse.jetty.util.thread.Invocable.InvocationType invocationType
-
terminated
private java.lang.Throwable terminated
-
stalledEntry
private HTTP2Flusher.Entry stalledEntry
-
-
Constructor Detail
-
HTTP2Flusher
public HTTP2Flusher(HTTP2Session session)
-
-
Method Detail
-
getInvocationType
public org.eclipse.jetty.util.thread.Invocable.InvocationType getInvocationType()
- Specified by:
getInvocationType
in interfaceorg.eclipse.jetty.util.thread.Invocable
-
window
public void window(IStream stream, WindowUpdateFrame frame)
-
prepend
public boolean prepend(HTTP2Flusher.Entry entry)
-
append
public boolean append(HTTP2Flusher.Entry entry)
-
append
public boolean append(java.util.List<HTTP2Flusher.Entry> list)
-
getWindowQueueSize
private int getWindowQueueSize()
-
getFrameQueueSize
public int getFrameQueueSize()
-
process
protected org.eclipse.jetty.util.IteratingCallback.Action process() throws java.lang.Throwable
- Specified by:
process
in classorg.eclipse.jetty.util.IteratingCallback
- Throws:
java.lang.Throwable
-
onFlushed
void onFlushed(long bytes) throws java.io.IOException
- Throws:
java.io.IOException
-
succeeded
public void succeeded()
- Specified by:
succeeded
in interfaceorg.eclipse.jetty.util.Callback
- Overrides:
succeeded
in classorg.eclipse.jetty.util.IteratingCallback
-
finish
private void finish()
-
onCompleteSuccess
protected void onCompleteSuccess()
- Overrides:
onCompleteSuccess
in classorg.eclipse.jetty.util.IteratingCallback
-
onCompleteFailure
protected void onCompleteFailure(java.lang.Throwable x)
- Overrides:
onCompleteFailure
in classorg.eclipse.jetty.util.IteratingCallback
-
terminate
void terminate(java.lang.Throwable cause)
-
closed
private void closed(HTTP2Flusher.Entry entry, java.lang.Throwable failure)
-
dump
public java.lang.String dump()
- Specified by:
dump
in interfaceorg.eclipse.jetty.util.component.Dumpable
-
dump
public void dump(java.lang.Appendable out, java.lang.String indent) throws java.io.IOException
- Specified by:
dump
in interfaceorg.eclipse.jetty.util.component.Dumpable
- Throws:
java.io.IOException
-
toString
public java.lang.String toString()
- Overrides:
toString
in classorg.eclipse.jetty.util.IteratingCallback
-
-