public interface Http2Stream
Modifier and Type | Interface and Description |
---|---|
static class |
Http2Stream.State
The allowed states of an HTTP2 stream.
|
Modifier and Type | Method and Description |
---|---|
Http2Stream |
close()
Closes the stream.
|
Http2Stream |
closeLocalSide()
Closes the local side of this stream.
|
Http2Stream |
closeRemoteSide()
Closes the remote side of this stream.
|
<V> V |
getProperty(Http2Connection.PropertyKey key)
Returns application-defined data if any was associated with this stream.
|
Http2Stream |
headersReceived(boolean isInformational)
Indicates that headers have been received.
|
Http2Stream |
headersSent(boolean isInformational)
Indicates that headers have been sent to the remote endpoint on this stream.
|
int |
id()
Gets the unique identifier for this stream within the connection.
|
boolean |
isHeadersReceived()
Indicates whether or not the initial headers have been received.
|
boolean |
isHeadersSent()
Indicates whether or not headers were sent to the remote endpoint.
|
boolean |
isPushPromiseSent()
Indicates whether or not a push promise was sent to the remote endpoint.
|
boolean |
isResetSent()
Indicates whether a
RST_STREAM frame has been sent from the local endpoint for this stream. |
boolean |
isTrailersReceived()
Indicates whether or not the trailers have been received.
|
boolean |
isTrailersSent()
Indicates whether or not trailers were sent to the remote endpoint.
|
Http2Stream |
open(boolean halfClosed)
Opens this stream, making it available via
Http2Connection.forEachActiveStream(Http2StreamVisitor) and
transition state to:
Http2Stream.State.OPEN if state() is Http2Stream.State.IDLE and halfClosed is false . |
Http2Stream |
pushPromiseSent()
Indicates that a push promise was sent to the remote endpoint.
|
<V> V |
removeProperty(Http2Connection.PropertyKey key)
Returns and removes application-defined data if any was associated with this stream.
|
Http2Stream |
resetSent()
Sets the flag indicating that a
RST_STREAM frame has been sent from the local endpoint
for this stream. |
<V> V |
setProperty(Http2Connection.PropertyKey key,
V value)
Associates the application-defined data with this stream.
|
Http2Stream.State |
state()
Gets the state of this stream.
|
int id()
Http2Stream.State state()
Http2Stream open(boolean halfClosed) throws Http2Exception
Http2Connection.forEachActiveStream(Http2StreamVisitor)
and
transition state to:
Http2Stream.State.OPEN
if state()
is Http2Stream.State.IDLE
and halfClosed
is false
.Http2Stream.State.HALF_CLOSED_LOCAL
if state()
is Http2Stream.State.IDLE
and halfClosed
is true
and the stream is local. In this state, isHeadersSent()
is true
Http2Stream.State.HALF_CLOSED_REMOTE
if state()
is Http2Stream.State.IDLE
and halfClosed
is true
and the stream is remote. In this state, isHeadersReceived()
is true
Http2Stream.State.RESERVED_LOCAL
if state()
is Http2Stream.State.HALF_CLOSED_REMOTE
.Http2Stream.State.RESERVED_REMOTE
if state()
is Http2Stream.State.HALF_CLOSED_LOCAL
.Http2Exception
Http2Stream close()
Http2Stream closeLocalSide()
Http2Stream closeRemoteSide()
boolean isResetSent()
RST_STREAM
frame has been sent from the local endpoint for this stream.Http2Stream resetSent()
RST_STREAM
frame has been sent from the local endpoint
for this stream. This does not affect the stream state.<V> V setProperty(Http2Connection.PropertyKey key, V value)
key
, or null
if there was none.<V> V getProperty(Http2Connection.PropertyKey key)
<V> V removeProperty(Http2Connection.PropertyKey key)
Http2Stream headersSent(boolean isInformational)
isHeadersSent()
} and the second call would indicate the trailers
(see isTrailersReceived()
).isInformational
- true
if the headers contain an informational status code (for responses only).boolean isHeadersSent()
boolean isTrailersSent()
Http2Stream headersReceived(boolean isInformational)
isHeadersReceived()
} and the second call would indicate the trailers
(see isTrailersReceived()
).isInformational
- true
if the headers contain an informational status code (for responses only).boolean isHeadersReceived()
boolean isTrailersReceived()
Http2Stream pushPromiseSent()
boolean isPushPromiseSent()
Copyright © 2008–2024 The Netty Project. All rights reserved.