Home
last modified time | relevance | path

Searched refs:Http2Error (Results 1 – 9 of 9) sorted by relevance

/external/grpc-grpc-java/core/src/test/java/io/grpc/internal/
DGrpcUtilTest.java35 import io.grpc.internal.GrpcUtil.Http2Error;
52 assertNull(Http2Error.forCode(-1)); in http2ErrorForCode()
53 assertSame(Http2Error.NO_ERROR, Http2Error.forCode(0)); in http2ErrorForCode()
54 assertSame(Http2Error.HTTP_1_1_REQUIRED, Http2Error.forCode(0xD)); in http2ErrorForCode()
55 assertNull(Http2Error.forCode(0xD + 1)); in http2ErrorForCode()
60 for (Http2Error error : Http2Error.values()) { in http2ErrorRoundTrip()
61 assertSame(error, Http2Error.forCode(error.code())); in http2ErrorRoundTrip()
68 assertSame(Status.Code.CANCELLED, Http2Error.CANCEL.status().getCode()); in http2ErrorStatus()
73 assertSame(Status.Code.INTERNAL, Http2Error.statusForCode(-1).getCode()); in http2ErrorStatusForCode()
74 assertSame(Http2Error.NO_ERROR.status(), Http2Error.statusForCode(0)); in http2ErrorStatusForCode()
[all …]
/external/grpc-grpc-java/netty/src/test/java/io/grpc/netty/
DNettyServerHandlerTest.java78 import io.netty.handler.codec.http2.Http2Error;
297 channelRead(rstStreamFrame(STREAM_ID, (int) Http2Error.CANCEL.code())); in clientCancelShouldForwardToStreamListener()
336 verifyWrite().writeGoAway(eq(ctx()), eq(0), eq(Http2Error.NO_ERROR.code()), in closeShouldCloseChannel()
408 eq(Http2Error.CANCEL.code()), any(ChannelPromise.class)); in cancelShouldSendRstStream()
538 channelRead(rstStreamFrame(STREAM_ID, (int) Http2Error.CANCEL.code())); in keepAliveManagerOnDataReceived_rstStreamRead()
614 verifyWrite().writeGoAway(eq(ctx()), eq(0), eq(Http2Error.ENHANCE_YOUR_CALM.code()), in keepAliveEnforcer_enforcesPings()
638 eq(Http2Error.ENHANCE_YOUR_CALM.code()), any(ByteBuf.class), any(ChannelPromise.class)); in keepAliveEnforcer_sendingDataResetsCounters()
651 eq(Http2Error.ENHANCE_YOUR_CALM.code()), any(ByteBuf.class), any(ChannelPromise.class)); in keepAliveEnforcer_initialIdle()
666 eq(Http2Error.ENHANCE_YOUR_CALM.code()), any(ByteBuf.class), any(ChannelPromise.class)); in keepAliveEnforcer_noticesActive()
676 channelRead(rstStreamFrame(STREAM_ID, (int) Http2Error.CANCEL.code())); in keepAliveEnforcer_noticesInactive()
[all …]
DNettyClientHandlerTest.java79 import io.netty.handler.codec.http2.Http2Error;
217 verifyWrite().writeRstStream(eq(ctx()), eq(3), eq(Http2Error.CANCEL.code()), in cancelShouldSucceed()
229 verifyWrite().writeRstStream(eq(ctx()), eq(3), eq(Http2Error.CANCEL.code()), in cancelDeadlineExceededShouldSucceed()
259 eq(Http2Error.CANCEL.code()), any(ChannelPromise.class)); in cancelTwiceShouldSucceed()
271 verifyWrite().writeRstStream(eq(ctx()), eq(3), eq(Http2Error.CANCEL.code()), in cancelTwiceDifferentReasons()
362 channelRead(rstStreamFrame(streamId, (int) Http2Error.REFUSED_STREAM.code() )); in receivedResetWithRefuseCode()
370 channelRead(rstStreamFrame(streamId, (int) Http2Error.CANCEL.code())); in receivedResetWithCanceCode()
DUtilsTest.java38 import io.netty.handler.codec.http2.Http2Error;
61 t = new Http2Exception(Http2Error.INTERNAL_ERROR, "msg"); in testStatusFromThrowable()
/external/grpc-grpc-java/core/src/main/java/io/grpc/internal/
DGrpcUtil.java302 public enum Http2Error { enum in GrpcUtil
325 private static final Http2Error[] codeMap = buildHttp2CodeMap();
327 private static Http2Error[] buildHttp2CodeMap() { in buildHttp2CodeMap()
328 Http2Error[] errors = Http2Error.values(); in buildHttp2CodeMap()
330 Http2Error[] http2CodeMap = new Http2Error[size]; in buildHttp2CodeMap()
331 for (Http2Error error : errors) { in buildHttp2CodeMap()
344 Http2Error(int code, Status status) { in Http2Error() method in GrpcUtil.Http2Error
369 public static Http2Error forCode(long code) { in forCode()
387 Http2Error error = forCode(code); in statusForCode()
/external/grpc-grpc-java/netty/src/main/java/io/grpc/netty/
DNettyClientHandler.java56 import io.netty.handler.codec.http2.Http2Error;
247 if (errorCode == Http2Error.ENHANCE_YOUR_CALM.code()) { in NettyClientHandler()
368 Status status = GrpcUtil.Http2Error.statusForCode((int) errorCode) in onRstStreamRead()
372 errorCode == Http2Error.REFUSED_STREAM.code() in onRstStreamRead()
568 encoder().writeRstStream(ctx, stream.id(), Http2Error.CANCEL.code(), promise); in cancelStream()
657 resetStream(ctx, stream.id(), Http2Error.CANCEL.code(), ctx.newPromise()); in forcefulClose()
702 Status status = GrpcUtil.Http2Error.statusForCode((int) errorCode) in statusFromGoAway()
DNettyServerHandler.java66 import io.netty.handler.codec.http2.Http2Error;
632 resetStream(ctx, streamId, Http2Error.CANCEL.code(), promise); in sendResponseHeaders()
646 encoder().writeRstStream(ctx, cmd.stream().id(), Http2Error.CANCEL.code(), promise); in cancelStream()
658 resetStream(ctx, stream.id(), Http2Error.CANCEL.code(), ctx.newPromise()); in forcefulClose()
702 streamId, Http2Error.INTERNAL_ERROR, cause, Strings.nullToEmpty(cause.getMessage())); in newStreamException()
759 goAway(ctx, connection().remote().lastStreamCreated(), Http2Error.ENHANCE_YOUR_CALM.code(), in onPingRead()
867 Http2Error.NO_ERROR.code(), in start()
897 Http2Error.NO_ERROR.code(), in secondGoAwayAndClose()
DGrpcHttp2HeadersUtils.java37 import static io.netty.handler.codec.http2.Http2Error.PROTOCOL_ERROR;
/external/grpc-grpc-java/okhttp/src/main/java/io/grpc/okhttp/
DOkHttpClientTransport.java1146 Status status = GrpcUtil.Http2Error.statusForCode(errorCode.httpCode) in goAway()