class GoogleDefaultProtocolNegotiator implements ProtocolNegotiator {

  @Override
  public Handler newHandler(GrpcHttp2ConnectionHandler grpcHandler) {
    if (grpcHandler.getEagAttributes().get(GrpcAttributes.ATTR_LB_ADDR_AUTHORITY) != null
        || grpcHandler.getEagAttributes().get(GrpcAttributes.ATTR_LB_PROVIDED_BACKEND) != null) {
      return altsProtocolNegotiator.newHandler(grpcHandler);
    } else {
      return tlsProtocolNegotiator.newHandler(grpcHandler);
    }
  }

  public  GoogleDefaultProtocolNegotiator(TsiHandshakerFactory altsFactory, SslContext sslContext);
  @VisibleForTesting  GoogleDefaultProtocolNegotiator(
      ProtocolNegotiator altsProtocolNegotiator, ProtocolNegotiator tlsProtocolNegotiator);

}