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

public Class HTTP2Stream

extends Object
implements Stream, Attachable, Closeable, Callback, Dumpable, Expirable
Class Inheritance
All Implemented Interfaces
org.eclipse.jetty.io.CyclicTimeouts.Expirable, org.eclipse.jetty.util.component.Dumpable, org.eclipse.jetty.util.Callback, org.eclipse.jetty.util.thread.Invocable, java.io.Closeable, java.lang.AutoCloseable, org.eclipse.jetty.util.Attachable, org.eclipse.jetty.http2.api.Stream
Imports
java.io.Closeable, .EOFException, .IOException, java.nio.channels.WritePendingException, java.util.ArrayDeque, .ArrayList, .Collections, .Deque, .List, .Objects, java.util.concurrent.ConcurrentHashMap, .ConcurrentMap, .TimeUnit, .TimeoutException, java.util.concurrent.atomic.AtomicInteger, .AtomicReference, org.eclipse.jetty.http.HttpFields, .HttpHeader, .HttpMethod, .MetaData, org.eclipse.jetty.http2.api.Stream, org.eclipse.jetty.http2.frames.DataFrame, .FailureFrame, .Frame, .HeadersFrame, .PushPromiseFrame, .ResetFrame, .StreamFrame, .WindowUpdateFrame, org.eclipse.jetty.io.CyclicTimeouts, .EofException, org.eclipse.jetty.util.Attachable, .Callback, .NanoTime, .Promise, org.eclipse.jetty.util.component.Dumpable, org.eclipse.jetty.util.thread.AutoLock, org.slf4j.Logger, .LoggerFactory

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
HTTP2Stream.FrameList

An ordered list of frames belonging to the same stream.

Field Summary

Modifier and TypeField and Description
private final AtomicReference<Object>
private final AtomicReference<ConcurrentMap<String, Object>>
private final AtomicReference<CloseState>
private boolean
private final long
private boolean
private long
private final Deque<Stream.Data>
private boolean
private long
private Throwable
private long
private Stream.Listener
private final boolean
private boolean
private final AutoLock
private static final Logger
private final AtomicInteger
private boolean
private final MetaData.Request
private Callback
private final AtomicInteger
private final HTTP2Session
private final int

Constructor Summary

AccessConstructor and Description
public
HTTP2Stream(HTTP2Session session, int streamId, MetaData.Request request, boolean local)

Method Summary

Modifier and TypeMethod and Description
private ConcurrentMap<String, Object>
public void
close()

Implements java.io.Closeable.close.

Closes this stream and releases any system resources associated with it.

public void
public void
data(DataFrame
the DATA frame to send
frame
,
Callback
the callback that gets notified when the frame has been sent
callback
)

Implements org.eclipse.jetty.http2.api.Stream.data.

Sends the given DATA frame.

private int
public void
demand()

Implements org.eclipse.jetty.http2.api.Stream.demand.

Demands more DATA frames for this stream.

private int
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 Callback
public boolean
equals(Object
the reference object with which to compare.
o
)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

public void
failed(Throwable
the reason for the operation failure
x
)

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

Callback invoked when the operation fails.

public Object
public Object
public long
public long
getExpireNanoTime()

Implements org.eclipse.jetty.io.CyclicTimeouts.Expirable.getExpireNanoTime.

Returns the expiration time in nanoseconds.

public int
getId()

Implements org.eclipse.jetty.http2.api.Stream.getId.

Get the stream unique id.

public long
public Invocable.InvocationType
public Stream.Listener
public int
public int
public HTTP2Session
getSession()

Implements org.eclipse.jetty.http2.api.Stream.getSession.

Get the session this stream is associated to.

private boolean
public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.

public void
headers(HeadersFrame
the HEADERS frame to send
frame
,
Callback
the callback that gets notified when the frame has been sent
callback
)

Implements org.eclipse.jetty.http2.api.Stream.headers.

Sends the given HEADERS frame.

public boolean
public boolean
private boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public void
private void
private void
private void
notifyFailure(Stream stream, FailureFrame frame, Callback callback)

protected void
private void
private void
private void
notifyReset(Stream stream, ResetFrame frame, Callback callback)

private boolean
public void
private void
private void
onFailure(FailureFrame frame, Callback callback)

private void
onHeaders(HeadersFrame frame, Callback callback)

protected void
private void
private void
onPush(PushPromiseFrame frame, Callback callback)

private void
onReset(ResetFrame frame, Callback callback)

private void
public void
process(Frame frame, Callback callback)

public void
public void
public void
push(PushPromiseFrame
the PUSH_PROMISE frame to send
frame
,
Promise<Stream>
the promise that gets notified of the pushed stream creation
promise
,
Stream.Listener
the listener that gets notified of stream events
listener
)

Implements org.eclipse.jetty.http2.api.Stream.push.

Sends the given PUSH_PROMISE frame.

public Stream.Data
readData()

Implements org.eclipse.jetty.http2.api.Stream.readData.

Reads DATA frames from this stream, wrapping them in retainable Data objects.

public Object
public void
reset(ResetFrame
the RST_STREAM frame to send
frame
,
Callback
the callback that gets notified when the frame has been sent
callback
)

Implements org.eclipse.jetty.http2.api.Stream.reset.

Sends the given RST_STREAM frame.

public void
send(HTTP2Stream.FrameList frameList, Callback callback)

public void
setAttachment(Object
the object to attach to this instance
attachment
)

Implements org.eclipse.jetty.util.Attachable.setAttachment.

Attaches the given object to this stream for later retrieval.

public void
setAttribute(String
the attribute key
key
,
Object
an arbitrary object to associate with the given key to this stream
value
)

Implements org.eclipse.jetty.http2.api.Stream.setAttribute.

public void
setIdleTimeout(long
the stream idle timeout
idleTimeout
)

Implements org.eclipse.jetty.http2.api.Stream.setIdleTimeout.

public void
private boolean
startWrite(Callback callback)

public void
succeeded()

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

Callback invoked when the operation completes.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

public boolean
updateClose(boolean update, CloseState.Event event)

private boolean
private boolean
private boolean
public int
updateRecvWindow(int delta)

public int
updateSendWindow(int delta)

private void
updateStreamCount(int deltaStream, int deltaClosing)

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait