Class ProxyConfiguration

java.lang.Object
com.sap.cloud.sdk.cloudplatform.connectivity.ProxyConfiguration

public class ProxyConfiguration extends Object
Proxy configuration.
  • Constructor Details

    • ProxyConfiguration

      public ProxyConfiguration(@Nonnull URI uri)
      Creates a configuration based on the given URI and without any credentials.
      Parameters:
      uri - The URI to initiate the configuration with.
    • ProxyConfiguration

      public ProxyConfiguration(@Nonnull URI uri, @Nullable Credentials credentials)
      Creates a configuration based on the given URI and credentials.
      Parameters:
      uri - The URI to initiate the configuration with.
      credentials - The credentials that can be used to connect to a remote.
  • Method Details

    • getCredentials

      @Nonnull public io.vavr.control.Option<Credentials> getCredentials()
      Getter for the credentials, wrapped in an Option, as it may be null.
      Returns:
      The credentials of this configuration.
    • of

      @Nonnull public static ProxyConfiguration of(@Nonnull URI uri, @Nullable Credentials credentials)
      Static factory to create a configuration based on an URI and credentials.
      Parameters:
      uri - The URI to initiate the configuration with.
      credentials - The credentials that can be used to connect to a remote.
      Returns:
      A configuration based on the given parameter.
    • of

      @Nonnull public static ProxyConfiguration of(@Nonnull URI uri)
      Static factory to create a configuration solely based on an URI.
      Parameters:
      uri - The URI to initiate the configuration with.
      Returns:
      A configuration based on the given URI.
    • of

      @Nonnull public static ProxyConfiguration of(@Nonnull String uri, @Nullable Credentials credentials) throws IllegalArgumentException
      Static factory to create a configuration based on an URI (as a String) and credentials.
      Parameters:
      uri - The URI string to initiate the configuration with.
      credentials - The credentials that can be used to connect to a remote.
      Returns:
      A configuration based on the given parameter.
      Throws:
      IllegalArgumentException - if the URI String cannot be parsed as an URI.
    • of

      @Nonnull public static ProxyConfiguration of(@Nonnull String uri) throws IllegalArgumentException
      Static factory to create a configuration bsaed on an URI (as a String).
      Parameters:
      uri - The URI string to initiate the configuration with.
      Returns:
      A configuration based on the given URI.
      Throws:
      IllegalArgumentException - if the URI String cannot be parsed as an URI.
    • getUri

      @Nonnull public URI getUri()
    • equals

      public boolean equals(@Nullable Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(@Nullable Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      @Nonnull public String toString()
      Overrides:
      toString in class Object