List of usage examples for io.netty.handler.codec.http HttpHeaders getInt
public abstract Integer getInt(CharSequence name);
From source file:com.vmware.xenon.common.http.netty.NettyHttpToHttp2Handler.java
License:Open Source License
/** * Analogous to the {@link HttpToHttp2ConnectionHandler#getStreamId}. * However, behavior has changed NOT to modify the state of the instance since original * method changes state(increments nextReservationStreamId) and is called at * {@link #write(ChannelHandlerContext, Object, ChannelPromise)} subsequent to this method. *//*from w w w . java2 s . co m*/ private int getStreamId(HttpHeaders httpHeaders) { // when streamId in header is invalid(invalid format,etc), this throws exception Integer streamId = httpHeaders.getInt(HttpConversionUtil.ExtensionHeaderNames.STREAM_ID.text()); if (streamId != null) { return streamId; } return getDefaultStreamId(); }