public class ProxyConfiguration extends Object
Constructor and Description |
---|
ProxyConfiguration(URI uri)
Creates a configuration based on the given URI and without any credentials.
|
ProxyConfiguration(URI uri,
Credentials credentials)
Creates a configuration based on the given URI and credentials.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
canEqual(Object other) |
boolean |
equals(Object o) |
io.vavr.control.Option<Credentials> |
getCredentials()
Getter for the credentials, wrapped in an
Option , as it may be null. |
URI |
getUri() |
int |
hashCode() |
static ProxyConfiguration |
of(String uri)
Static factory to create a configuration bsaed on an URI (as a String).
|
static ProxyConfiguration |
of(String uri,
Credentials credentials)
Static factory to create a configuration based on an URI (as a String) and credentials.
|
static ProxyConfiguration |
of(URI uri)
Static factory to create a configuration solely based on an URI.
|
static ProxyConfiguration |
of(URI uri,
Credentials credentials)
Static factory to create a configuration based on an URI and credentials.
|
String |
toString() |
public ProxyConfiguration(@Nonnull URI uri)
uri
- The URI to initiate the configuration with.public ProxyConfiguration(@Nonnull URI uri, @Nullable Credentials credentials)
uri
- The URI to initiate the configuration with.credentials
- The credentials that can be used to connect to a remote.@Nonnull public io.vavr.control.Option<Credentials> getCredentials()
Option
, as it may be null.@Nonnull public static ProxyConfiguration of(@Nonnull URI uri, @Nullable Credentials credentials)
uri
- The URI to initiate the configuration with.credentials
- The credentials that can be used to connect to a remote.@Nonnull public static ProxyConfiguration of(@Nonnull URI uri)
uri
- The URI to initiate the configuration with.@Nonnull public static ProxyConfiguration of(@Nonnull String uri, @Nullable Credentials credentials) throws IllegalArgumentException
uri
- The URI string to initiate the configuration with.credentials
- The credentials that can be used to connect to a remote.IllegalArgumentException
- if the URI String cannot be parsed as an URI.@Nonnull public static ProxyConfiguration of(@Nonnull String uri) throws IllegalArgumentException
uri
- The URI string to initiate the configuration with.IllegalArgumentException
- if the URI String cannot be parsed as an URI.protected boolean canEqual(Object other)
Copyright © 2020 SAP SE. All rights reserved.