public class Http2ClientChannel extends Object
Http2ClientChannel encapsulates the Channel associated with a particular connection.
This shouldn't have anything related to a single message.
| Constructor and Description |
|---|
Http2ClientChannel(Http2ConnectionManager http2ConnectionManager,
io.netty.handler.codec.http2.Http2Connection connection,
HttpRoute httpRoute,
io.netty.channel.Channel channel) |
| Modifier and Type | Method and Description |
|---|---|
void |
addDataEventListener(String name,
Http2DataEventListener dataEventListener)
Adds a listener which listen for HTTP/2 data events.
|
io.netty.channel.Channel |
getChannel()
Gets the netty channel associated with this
Http2ClientChannel. |
io.netty.channel.ChannelFuture |
getChannelFuture()
Gets the
ChannelFuture associated with this Http2ClientChannel. |
io.netty.handler.codec.http2.Http2Connection |
getConnection()
Gets the HTTP/2 connection associated with this
Http2ClientChannel. |
List<Http2DataEventListener> |
getDataEventListeners()
Gets the list of listeners which listen for HTTP/2 data events.
|
OutboundMsgHolder |
getInFlightMessage(int streamId)
Gets the in-flight message associated with the a particular stream id.
|
int |
getSocketIdleTimeout()
Gets the socket idle timeout of the channel.
|
void |
putInFlightMessage(int streamId,
OutboundMsgHolder inFlightMessage)
Adds a in-flight message.
|
void |
putPromisedMessage(int streamId,
OutboundMsgHolder promisedMessage)
Adds a promised message.
|
void |
removeInFlightMessage(int streamId)
Removes a in-flight message.
|
void |
removePromisedMessage(int streamId)
Removes a promised message.
|
void |
setChannel(io.netty.channel.Channel channel)
Sets the netty channel associated with this
Http2ClientChannel. |
void |
setChannelFuture(io.netty.channel.ChannelFuture channelFuture)
Sets the
ChannelFuture associated with this Http2ClientChannel. |
void |
setSocketIdleTimeout(int socketIdleTimeout)
Sets the socket idle timeout of the channel.
|
public Http2ClientChannel(Http2ConnectionManager http2ConnectionManager, io.netty.handler.codec.http2.Http2Connection connection, HttpRoute httpRoute, io.netty.channel.Channel channel)
public io.netty.channel.Channel getChannel()
Http2ClientChannel.public void setChannel(io.netty.channel.Channel channel)
Http2ClientChannel.channel - channel which represent the connectionpublic io.netty.handler.codec.http2.Http2Connection getConnection()
Http2ClientChannel.public io.netty.channel.ChannelFuture getChannelFuture()
ChannelFuture associated with this Http2ClientChannel.public void setChannelFuture(io.netty.channel.ChannelFuture channelFuture)
ChannelFuture associated with this Http2ClientChannel.channelFuture - associated ChannelFuturepublic void putInFlightMessage(int streamId,
OutboundMsgHolder inFlightMessage)
streamId - stream idinFlightMessage - OutboundMsgHolder which holds the in-flight messagepublic OutboundMsgHolder getInFlightMessage(int streamId)
streamId - stream idpublic void removeInFlightMessage(int streamId)
streamId - stream idpublic void putPromisedMessage(int streamId,
OutboundMsgHolder promisedMessage)
streamId - stream idpromisedMessage - OutboundMsgHolder which holds the promised messagepublic void removePromisedMessage(int streamId)
streamId - stream idpublic void addDataEventListener(String name, Http2DataEventListener dataEventListener)
name - name of the listenerdataEventListener - the data event listenerpublic List<Http2DataEventListener> getDataEventListeners()
public int getSocketIdleTimeout()
public void setSocketIdleTimeout(int socketIdleTimeout)
socketIdleTimeout - the socket idle timeoutCopyright © 2022 WSO2. All rights reserved.