public interface Http2Connection
Modifier and Type | Interface and Description |
---|---|
static interface |
Http2Connection.Endpoint<F extends Http2FlowController>
A view of the connection from one endpoint (local or remote).
|
static interface |
Http2Connection.Listener
Listener for life-cycle events for streams in this connection.
|
Modifier and Type | Method and Description |
---|---|
Collection<Http2Stream> |
activeStreams()
Gets all streams that are actively in use.
|
void |
addListener(Http2Connection.Listener listener)
Adds a listener of stream life-cycle events.
|
Http2Stream |
connectionStream()
Gets the stream object representing the connection, itself (i.e. stream zero).
|
Http2Stream |
createLocalStream(int streamId)
Creates a new stream initiated by the local endpoint
|
Http2Stream |
createRemoteStream(int streamId)
Creates a new stream initiated by the remote endpoint.
|
void |
deactivate(Http2Stream stream)
Indicates that the given stream is no longer actively in use.
|
boolean |
goAwayReceived()
Indicates whether or not a
GOAWAY was received from the remote endpoint. |
void |
goAwayReceived(int lastKnownStream)
Indicates that a
GOAWAY was received from the remote endpoint and sets the last known stream. |
boolean |
goAwaySent()
Indicates whether or not a
GOAWAY was sent to the remote endpoint. |
void |
goAwaySent(int lastKnownStream)
Indicates that a
GOAWAY was sent to the remote endpoint and sets the last known stream. |
boolean |
isGoAway()
Indicates whether or not either endpoint has received a GOAWAY.
|
boolean |
isServer()
Indicates whether or not the local endpoint for this connection is the server.
|
Http2Connection.Endpoint<Http2LocalFlowController> |
local()
Gets a view of this connection from the local
Http2Connection.Endpoint . |
int |
numActiveStreams()
Gets the number of streams that actively in use.
|
Http2Connection.Endpoint<Http2RemoteFlowController> |
remote()
Gets a view of this connection from the remote
Http2Connection.Endpoint . |
void |
removeListener(Http2Connection.Listener listener)
Removes a listener of stream life-cycle events.
|
Http2Stream |
requireStream(int streamId)
Attempts to get the stream for the given ID.
|
Http2Stream |
stream(int streamId)
Gets the stream if it exists.
|
void addListener(Http2Connection.Listener listener)
void removeListener(Http2Connection.Listener listener)
Http2Stream requireStream(int streamId) throws Http2Exception
Http2Exception
Http2Stream stream(int streamId)
null
.Http2Stream connectionStream()
int numActiveStreams()
Collection<Http2Stream> activeStreams()
void deactivate(Http2Stream stream)
activeStreams()
and numActiveStreams()
will be decremented. In addition,
all listeners will be notified of this event via
Http2Connection.Listener.streamInactive(Http2Stream)
.boolean isServer()
Http2Connection.Endpoint<Http2LocalFlowController> local()
Http2Connection.Endpoint
.Http2Stream createLocalStream(int streamId) throws Http2Exception
Http2Exception
Http2Connection.Endpoint.createStream(int)
Http2Connection.Endpoint<Http2RemoteFlowController> remote()
Http2Connection.Endpoint
.Http2Stream createRemoteStream(int streamId) throws Http2Exception
Http2Exception
Http2Connection.Endpoint.createStream(int)
boolean goAwayReceived()
GOAWAY
was received from the remote endpoint.void goAwayReceived(int lastKnownStream)
GOAWAY
was received from the remote endpoint and sets the last known stream.boolean goAwaySent()
GOAWAY
was sent to the remote endpoint.void goAwaySent(int lastKnownStream)
GOAWAY
was sent to the remote endpoint and sets the last known stream.boolean isGoAway()
Copyright © 2008–2015 The Netty Project. All rights reserved.