public static Factory factory(
      EventHandlers eventHandlers,
      String serverUrl,
      String imageName,
      FailoverHttpClient httpClient) {
    return new Factory(
        eventHandlers, new RegistryEndpointRequestProperties(serverUrl, imageName), httpClient);
  }
Creates a new {@link Factory} for building a {@link RegistryClient}.

@param eventHandlers the event handlers used for dispatching log events
@param serverUrl the server URL for the registry (for example, {@code gcr.io})
@param imageName the image/repository name (also known as, namespace)
@param httpClient HTTP client
@return the new {@link Factory}
jib-core/src/main/java/com/google/cloud/tools/jib/registry/RegistryClient.java