public enum UrlScheme extends Enum<UrlScheme>
| Enum Constant and Description |
|---|
INSTANCE |
| Modifier and Type | Field and Description |
|---|---|
static String |
HTTP |
static String |
HTTPS |
static String |
HTTPS_PORT_PROP |
| Modifier and Type | Method and Description |
|---|---|
String |
applyUrlScheme(String url)
Given a URL string with or without a scheme, return a new URL with the correct scheme applied.
|
String |
getBaseUrlForNodeName(String nodeName) |
String |
getUrlScheme() |
void |
setUrlScheme(String urlScheme)
Set the global urlScheme variable; ideally this should be immutable once set, but some tests rely on changing
the value on-the-fly.
|
static UrlScheme |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static UrlScheme[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final UrlScheme INSTANCE
public static final String HTTP
public static final String HTTPS
public static final String HTTPS_PORT_PROP
public static UrlScheme[] values()
for (UrlScheme c : UrlScheme.values()) System.out.println(c);
public static UrlScheme valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic void setUrlScheme(String urlScheme)
urlScheme - The new URL scheme, either http or https.public String applyUrlScheme(String url)
url - A URL to change the scheme (http|https)public String getUrlScheme()
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.