Package io.netty.handler.codec.http2
Class DefaultHttp2Connection.ConnectionStream
- java.lang.Object
-
- io.netty.handler.codec.http2.DefaultHttp2Connection.DefaultStream
-
- io.netty.handler.codec.http2.DefaultHttp2Connection.ConnectionStream
-
- All Implemented Interfaces:
Http2Stream
- Enclosing class:
- DefaultHttp2Connection
private final class DefaultHttp2Connection.ConnectionStream extends DefaultHttp2Connection.DefaultStream
Stream class representing the connection, itself.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.netty.handler.codec.http2.Http2Stream
Http2Stream.State
-
-
Constructor Summary
Constructors Constructor Description ConnectionStream()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Http2Stream
close()
Closes the stream.Http2Stream
closeLocalSide()
Closes the local side of this stream.Http2Stream
closeRemoteSide()
Closes the remote side of this stream.(package private) DefaultHttp2Connection.DefaultEndpoint<? extends Http2FlowController>
createdBy()
Http2Stream
headersSent(boolean isInformational)
Indicates that headers have been sent to the remote endpoint on this stream.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 aRST_STREAM
frame has been sent from the local endpoint for this stream.Http2Stream
open(boolean halfClosed)
Opens this stream, making it available viaHttp2Connection.forEachActiveStream(Http2StreamVisitor)
and transition state to:Http2Stream.State.OPEN
ifHttp2Stream.state()
isHttp2Stream.State.IDLE
andhalfClosed
isfalse
.Http2Stream.State.HALF_CLOSED_LOCAL
ifHttp2Stream.state()
isHttp2Stream.State.IDLE
andhalfClosed
istrue
and the stream is local.Http2Stream
pushPromiseSent()
Indicates that a push promise was sent to the remote endpoint.Http2Stream
resetSent()
Sets the flag indicating that aRST_STREAM
frame has been sent from the local endpoint for this stream.-
Methods inherited from class io.netty.handler.codec.http2.DefaultHttp2Connection.DefaultStream
activate, close, equals, getProperty, hashCode, headersReceived, id, isHeadersReceived, isLocal, isTrailersReceived, isTrailersSent, removeProperty, setProperty, state, toString
-
-
-
-
Method Detail
-
isResetSent
public boolean isResetSent()
Description copied from interface:Http2Stream
Indicates whether aRST_STREAM
frame has been sent from the local endpoint for this stream.- Specified by:
isResetSent
in interfaceHttp2Stream
- Overrides:
isResetSent
in classDefaultHttp2Connection.DefaultStream
-
createdBy
DefaultHttp2Connection.DefaultEndpoint<? extends Http2FlowController> createdBy()
- Overrides:
createdBy
in classDefaultHttp2Connection.DefaultStream
-
resetSent
public Http2Stream resetSent()
Description copied from interface:Http2Stream
Sets the flag indicating that aRST_STREAM
frame has been sent from the local endpoint for this stream. This does not affect the stream state.- Specified by:
resetSent
in interfaceHttp2Stream
- Overrides:
resetSent
in classDefaultHttp2Connection.DefaultStream
-
open
public Http2Stream open(boolean halfClosed)
Description copied from interface:Http2Stream
Opens this stream, making it available viaHttp2Connection.forEachActiveStream(Http2StreamVisitor)
and transition state to:Http2Stream.State.OPEN
ifHttp2Stream.state()
isHttp2Stream.State.IDLE
andhalfClosed
isfalse
.Http2Stream.State.HALF_CLOSED_LOCAL
ifHttp2Stream.state()
isHttp2Stream.State.IDLE
andhalfClosed
istrue
and the stream is local. In this state,Http2Stream.isHeadersSent()
istrue
Http2Stream.State.HALF_CLOSED_REMOTE
ifHttp2Stream.state()
isHttp2Stream.State.IDLE
andhalfClosed
istrue
and the stream is remote. In this state,Http2Stream.isHeadersReceived()
istrue
Http2Stream.State.RESERVED_LOCAL
ifHttp2Stream.state()
isHttp2Stream.State.HALF_CLOSED_REMOTE
.Http2Stream.State.RESERVED_REMOTE
ifHttp2Stream.state()
isHttp2Stream.State.HALF_CLOSED_LOCAL
.
- Specified by:
open
in interfaceHttp2Stream
- Overrides:
open
in classDefaultHttp2Connection.DefaultStream
-
close
public Http2Stream close()
Description copied from interface:Http2Stream
Closes the stream.- Specified by:
close
in interfaceHttp2Stream
- Overrides:
close
in classDefaultHttp2Connection.DefaultStream
-
closeLocalSide
public Http2Stream closeLocalSide()
Description copied from interface:Http2Stream
Closes the local side of this stream. If this makes the stream closed, the child is closed as well.- Specified by:
closeLocalSide
in interfaceHttp2Stream
- Overrides:
closeLocalSide
in classDefaultHttp2Connection.DefaultStream
-
closeRemoteSide
public Http2Stream closeRemoteSide()
Description copied from interface:Http2Stream
Closes the remote side of this stream. If this makes the stream closed, the child is closed as well.- Specified by:
closeRemoteSide
in interfaceHttp2Stream
- Overrides:
closeRemoteSide
in classDefaultHttp2Connection.DefaultStream
-
headersSent
public Http2Stream headersSent(boolean isInformational)
Description copied from interface:Http2Stream
Indicates that headers have been sent to the remote endpoint on this stream. The first call to this method would be for the initial headers (seeHttp2Stream.isHeadersSent()
} and the second call would indicate the trailers (seeHttp2Stream.isTrailersReceived()
).- Specified by:
headersSent
in interfaceHttp2Stream
- Overrides:
headersSent
in classDefaultHttp2Connection.DefaultStream
- Parameters:
isInformational
-true
if the headers contain an informational status code (for responses only).
-
isHeadersSent
public boolean isHeadersSent()
Description copied from interface:Http2Stream
Indicates whether or not headers were sent to the remote endpoint.- Specified by:
isHeadersSent
in interfaceHttp2Stream
- Overrides:
isHeadersSent
in classDefaultHttp2Connection.DefaultStream
-
pushPromiseSent
public Http2Stream pushPromiseSent()
Description copied from interface:Http2Stream
Indicates that a push promise was sent to the remote endpoint.- Specified by:
pushPromiseSent
in interfaceHttp2Stream
- Overrides:
pushPromiseSent
in classDefaultHttp2Connection.DefaultStream
-
isPushPromiseSent
public boolean isPushPromiseSent()
Description copied from interface:Http2Stream
Indicates whether or not a push promise was sent to the remote endpoint.- Specified by:
isPushPromiseSent
in interfaceHttp2Stream
- Overrides:
isPushPromiseSent
in classDefaultHttp2Connection.DefaultStream
-
-