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) |
Optional<Credentials> |
getCredentials()
Getter for the credentials, wrapped in an
Optional , 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(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.public Optional<Credentials> getCredentials()
Optional
, as it may be null.public static ProxyConfiguration of(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.public static ProxyConfiguration of(URI uri)
uri
- The URI to initiate the configuration with.public static ProxyConfiguration of(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.public static ProxyConfiguration of(String uri) throws IllegalArgumentException
uri
- The URI string to initiate the configuration with.IllegalArgumentException
- if the URI String cannot be parsed as an URI.public URI getUri()
protected boolean canEqual(Object other)
Copyright © 2018 SAP SE. All rights reserved.