| Modifier and Type | Class and Description |
|---|---|
| public static interface | Http2Connection.Endpoint<F extends Http2FlowController>
A view of the connection from one endpoint (local or remote). |
| public static interface | Http2Connection.Listener
Listener for life-cycle events for streams in this connection. |
| public static interface | Http2Connection.PropertyKey
A key to be used for associating application-defined properties with streams within this connection. |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | |
| public Http2Stream | |
| public Http2Stream | Returns: The stream before iteration stopped ornull if iteration went past the end.The visitor which will visit each active stream. visitor)Provide a means of iterating over the collection of active streams. |
| public boolean | |
| public void | goAwayReceived(int
The Last-Stream-ID in the
GOAWAY frame. lastKnownStream, long the Error Code in the
GOAWAY frame. errorCode, Buffer The Additional Debug Data in the
GOAWAY frame. Note that reference count ownership
belongs to the caller (ownership is not transferred to this method). message)Indicates that a |
| public boolean | |
| public boolean | Returns: true if the corresponding GOAWAY frame should be sent to the remote endpoint.The Last-Stream-ID in the
GOAWAY frame. lastKnownStream, long the Error Code in the
GOAWAY frame. errorCode, Buffer The Additional Debug Data in the
GOAWAY frame. Note that reference count ownership
belongs to the caller (ownership is not transferred to this method). message)Updates the local state of this |
| public boolean | |
| public Http2Connection. | |
| public Http2Connection. | |
| public int | |
| public Http2Connection. | |
| public void | |
| public Http2Stream | |
| public boolean | streamMayHaveExisted(int streamId)
Indicates whether or not the given stream may have existed within this connection. |
| addListener | back to summary |
|---|---|
| public void addListener(Http2Connection. Adds a listener of stream life-cycle events. | |
| close | back to summary |
|---|---|
| public void close(Promise<Void> promise) Close this connection. No more new streams can be created after this point and all streams that exists (active or otherwise) will be closed and removed. Note if iterating active streams via | |
| connectionStream | back to summary |
|---|---|
| public Http2Stream connectionStream() Gets the stream object representing the connection, itself (i.e. stream zero). This object always exists. | |
| forEachActiveStream | back to summary |
|---|---|
| public Http2Stream forEachActiveStream(Http2StreamVisitor visitor) throws Http2Exception Provide a means of iterating over the collection of active streams.
| |
| goAwayReceived | back to summary |
|---|---|
| public boolean goAwayReceived() Indicates whether or not a | |
| goAwayReceived | back to summary |
|---|---|
| public void goAwayReceived(int lastKnownStream, long errorCode, Buffer message) throws Http2Exception Indicates that a | |
| goAwaySent | back to summary |
|---|---|
| public boolean goAwaySent() Indicates whether or not a | |
| goAwaySent | back to summary |
|---|---|
| public boolean goAwaySent(int lastKnownStream, long errorCode, Buffer message) throws Http2Exception Updates the local state of this
| |
| isServer | back to summary |
|---|---|
| public boolean isServer() Indicates whether or not the local endpoint for this connection is the server. | |
| local | back to summary |
|---|---|
| public Http2Connection. Gets a view of this connection from the local | |
| newKey | back to summary |
|---|---|
| public Http2Connection. Creates a new key that is unique within this | |
| numActiveStreams | back to summary |
|---|---|
| public int numActiveStreams() Gets the number of streams that are actively in use (i.e. | |
| remote | back to summary |
|---|---|
| public Http2Connection. Gets a view of this connection from the remote | |
| removeListener | back to summary |
|---|---|
| public void removeListener(Http2Connection. Removes a listener of stream life-cycle events. If the same listener was added multiple times then only the first occurrence gets removed. | |
| stream | back to summary |
|---|---|
| public Http2Stream stream(int streamId) Gets the stream if it exists. If not, returns | |
| streamMayHaveExisted | back to summary |
|---|---|
| public boolean streamMayHaveExisted(int streamId) Indicates whether or not the given stream may have existed within this connection. This is a short form
for calling | |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public boolean | |
| public boolean | canOpenStream()
Indicates whether or a stream created by this endpoint can be opened without violating
|
| public boolean | |
| public Http2Stream | createStream(int
The ID of the stream streamId, boolean halfClosed)Creates a stream initiated by this endpoint. |
| public F | |
| public void | |
| public int | |
| public boolean | |
| public boolean | isValidStreamId(int streamId)
Indicates whether the given streamId is from the set of IDs used by this endpoint to create new streams. |
| public int | |
| public int | lastStreamKnownByPeer()
If a GOAWAY was received for this endpoint, this will be the last stream ID from the GOAWAY frame. |
| public int | maxActiveStreams()
Gets the maximum number of streams (created by this endpoint) that are allowed to be active at the same time. |
| public void | maxActiveStreams(int
The maximum number of streams (created by this endpoint) that are allowed to be
active at once. This is the
SETTINGS_MAX_CONCURRENT_STREAMS value sent
from the opposite endpoint to restrict stream creation by this endpoint. maxActiveStreams)Sets the limit for |
| public boolean | mayHaveCreatedStream(int streamId)
Indicates whether or not this endpoint may have created the given stream. |
| public int | numActiveStreams()
Gets the number of active streams (i.e. |
| public Http2Connection. | |
| public Http2Stream | reservePushStream(int
the ID of the push stream streamId, Http2Stream the parent stream used to initiate the push stream. parent)Creates a push stream in the reserved state for this endpoint and notifies all listeners. |
| allowPushTo | back to summary |
|---|---|
| public void allowPushTo(boolean allow) This is the SETTINGS_ENABLE_PUSH value sent
from the opposite endpoint. This method should only be called by Netty (not users) as a result of a
receiving a | |
| allowPushTo | back to summary |
|---|---|
| public boolean allowPushTo() This is the SETTINGS_ENABLE_PUSH value sent
from the opposite endpoint. The initial value must be | |
| canOpenStream | back to summary |
|---|---|
| public boolean canOpenStream() Indicates whether or a stream created by this endpoint can be opened without violating
| |
| created | back to summary |
|---|---|
| public boolean created(Http2Stream stream) Indicates whether or not this endpoint created the given stream. | |
| createStream | back to summary |
|---|---|
| public Http2Stream createStream(int streamId, boolean halfClosed) throws Http2Exception Creates a stream initiated by this endpoint. This could fail for the following reasons:
The initial state of the stream will be immediately set before notifying
| |
| flowController | back to summary |
|---|---|
| public F flowController() Gets the flow controller for this endpoint. | |
| flowController | back to summary |
|---|---|
| public void flowController(F flowController) Sets the flow controller for this endpoint. | |
| incrementAndGetNextStreamId | back to summary |
|---|---|
| public int incrementAndGetNextStreamId() Increment and get the next generated stream id this endpoint. If negative, the stream IDs are exhausted for this endpoint an no further streams may be created. | |
| isServer | back to summary |
|---|---|
| public boolean isServer() Indicates whether or not this endpoint is the server-side of the connection. | |
| isValidStreamId | back to summary |
|---|---|
| public boolean isValidStreamId(int streamId) Indicates whether the given streamId is from the set of IDs used by this endpoint to create new streams. | |
| lastStreamCreated | back to summary |
|---|---|
| public int lastStreamCreated() Gets the ID of the stream last successfully created by this endpoint. | |
| lastStreamKnownByPeer | back to summary |
|---|---|
| public int lastStreamKnownByPeer() If a GOAWAY was received for this endpoint, this will be the last stream ID from the
GOAWAY frame. Otherwise, this will be | |
| maxActiveStreams | back to summary |
|---|---|
| public int maxActiveStreams() Gets the maximum number of streams (created by this endpoint) that are allowed to be active at the same time. This is the SETTINGS_MAX_CONCURRENT_STREAMS value sent from the opposite endpoint to restrict stream creation by this endpoint. The default value returned by this method must be "unlimited". | |
| maxActiveStreams | back to summary |
|---|---|
| public void maxActiveStreams(int maxActiveStreams) Sets the limit for
| |
| mayHaveCreatedStream | back to summary |
|---|---|
| public boolean mayHaveCreatedStream(int streamId) Indicates whether or not this endpoint may have created the given stream. This is | |
| numActiveStreams | back to summary |
|---|---|
| public int numActiveStreams() Gets the number of active streams (i.e. | |
| opposite | back to summary |
|---|---|
| public Http2Connection. Gets the | |
| reservePushStream | back to summary |
|---|---|
| public Http2Stream reservePushStream(int streamId, Http2Stream parent) throws Http2Exception Creates a push stream in the reserved state for this endpoint and notifies all listeners. This could fail for the following reasons:
| |
| Modifier and Type | Method and Description |
|---|---|
| public void | onGoAwayReceived(int
the last known stream of the remote endpoint. lastStreamId, long the error code, if abnormal closure. errorCode, Buffer application-defined debug data. debugData)Called when a |
| public void | onGoAwaySent(int
the last known stream of the remote endpoint. lastStreamId, long the error code, if abnormal closure. errorCode, Buffer application-defined debug data. debugData)Called when a |
| public void | onStreamActive(Http2Stream stream)
Notifies the listener that the given stream was made active (i.e. |
| public void | onStreamAdded(Http2Stream stream)
Notifies the listener that the given stream was added to the connection. |
| public void | onStreamClosed(Http2Stream stream)
Notifies the listener that the given stream is now |
| public void | onStreamHalfClosed(Http2Stream stream)
Notifies the listener that the given stream has transitioned from |
| public void | onStreamRemoved(Http2Stream stream)
Notifies the listener that the given stream has now been removed from the connection and
will no longer be returned via |
| onGoAwayReceived | back to summary |
|---|---|
| public void onGoAwayReceived(int lastStreamId, long errorCode, Buffer debugData) Called when a
If a
| |
| onGoAwaySent | back to summary |
|---|---|
| public void onGoAwaySent(int lastStreamId, long errorCode, Buffer debugData) Called when a
If a
| |
| onStreamActive | back to summary |
|---|---|
| public void onStreamActive(Http2Stream stream) Notifies the listener that the given stream was made active (i.e.
If a | |
| onStreamAdded | back to summary |
|---|---|
| public void onStreamAdded(Http2Stream stream) Notifies the listener that the given stream was added to the connection. This stream may
not yet be active (i.e.
If a | |
| onStreamClosed | back to summary |
|---|---|
| public void onStreamClosed(Http2Stream stream) Notifies the listener that the given stream is now
If a | |
| onStreamHalfClosed | back to summary |
|---|---|
| public void onStreamHalfClosed(Http2Stream stream) Notifies the listener that the given stream has transitioned from
If a | |
| onStreamRemoved | back to summary |
|---|---|
| public void onStreamRemoved(Http2Stream stream) Notifies the listener that the given stream has now been removed from the connection and
will no longer be returned via
If a | |