diff --git a/netty/src/main/java/io/grpc/netty/InternalProtocolNegotiators.java b/netty/src/main/java/io/grpc/netty/InternalProtocolNegotiators.java index eaaf973d0b..8af607a7f2 100644 --- a/netty/src/main/java/io/grpc/netty/InternalProtocolNegotiators.java +++ b/netty/src/main/java/io/grpc/netty/InternalProtocolNegotiators.java @@ -16,6 +16,8 @@ package io.grpc.netty; +import io.grpc.netty.ProtocolNegotiators.GrpcNegotiationHandler; +import io.grpc.netty.ProtocolNegotiators.WaitUntilActiveHandler; import io.netty.channel.ChannelHandler; import io.netty.channel.ChannelHandlerContext; import io.netty.handler.ssl.SslContext; @@ -69,4 +71,18 @@ public final class InternalProtocolNegotiators { return new TlsNegotiator(); } + + /** + * Internal version of {@link WaitUntilActiveHandler}. + */ + public static ChannelHandler waitUntilActiveHandler(ChannelHandler next) { + return new WaitUntilActiveHandler(next); + } + + /** + * Internal version of {@link GrpcNegotiationHandler}. + */ + public static ChannelHandler grpcNegotiationHandler(GrpcHttp2ConnectionHandler next) { + return new GrpcNegotiationHandler(next); + } }