List of usage examples for io.netty.handler.codec.http2 Http2Error valueOf
public static Http2Error valueOf(long value)
From source file:com.linecorp.armeria.common.http.Http2GoAwayListener.java
License:Apache License
private static String errorStr(long errorCode) { final Http2Error error = Http2Error.valueOf(errorCode); return error != null ? error.toString() + '(' + errorCode + ')' : "UNKNOWN(" + errorCode + ')'; }
From source file:com.linecorp.armeria.server.http.Http2RequestDecoder.java
License:Apache License
@Override public void onRstStreamRead(ChannelHandlerContext ctx, int streamId, long errorCode) throws Http2Exception { final DefaultHttpRequest req = requests.get(streamId); if (req == null) { throw connectionError(PROTOCOL_ERROR, "received a RST_STREAM frame for an unknown stream: %d", streamId);/*from w w w . ja v a 2 s. c om*/ } req.close(streamError(streamId, Http2Error.valueOf(errorCode), "received a RST_STREAM frame")); }
From source file:com.linecorp.armeria.server.Http2RequestDecoder.java
License:Apache License
@Override public void onRstStreamRead(ChannelHandlerContext ctx, int streamId, long errorCode) throws Http2Exception { final HttpRequestWriter req = requests.get(streamId); if (req == null) { throw connectionError(PROTOCOL_ERROR, "received a RST_STREAM frame for an unknown stream: %d", streamId);//from w ww .j a v a 2 s .c o m } req.close(streamError(streamId, Http2Error.valueOf(errorCode), "received a RST_STREAM frame")); }
From source file:com.linkedin.r2.transport.http.client.Http2FrameListener.java
License:Apache License
@Override public void onRstStreamRead(ChannelHandlerContext ctx, int streamId, long errorCode) throws Http2Exception { LOG.debug("Received HTTP/2 RST_STREAM frame, stream={}, error={}", streamId, Http2Error.valueOf(errorCode)); }
From source file:io.gatling.http.client.impl.ChunkedInboundHttp2ToHttpAdapter.java
License:Apache License
@Override public void onRstStreamRead(ChannelHandlerContext ctx, int streamId, long errorCode) { ctx.fireExceptionCaught(Http2Exception.streamError(streamId, Http2Error.valueOf(errorCode), "HTTP/2 to HTTP layer caught stream reset")); }