mirror of https://github.com/grpc/grpc-java.git
netty: expose some of the reusable handlers in ProtocolNegotiators
This commit is contained in:
parent
3ffec383e3
commit
d833767037
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue