public final class UtilitiesGeneral extends Object
Constructor and Description |
---|
UtilitiesGeneral() |
Modifier and Type | Method and Description |
---|---|
static boolean |
checkResponse(okhttp3.Headers headers,
int code)
Checks the headers to determine whether BDBA is up and running
|
static boolean |
connectionOk(ConnectionStatus connectionStatus)
Checks connection status for errors.
|
static boolean |
isPublicHost(String host) |
static boolean |
isUrl(String possibleUrl)
Does a very simple check that is the string provided a valid URL.
|
static String |
parseEnvironmentVariable(String envVar) |
static String |
replaceSpaceWithUnderscore(String line)
Replaces spaces with underscore in the given line.
|
static String |
timestamp()
Method for getting a nicely formated timestamp.
|
public static boolean connectionOk(ConnectionStatus connectionStatus)
connectionStatus
- the status object to checkpublic static boolean checkResponse(okhttp3.Headers headers, int code)
headers
- headers from responsecode
- the http response codepublic static boolean isPublicHost(String host)
public static String replaceSpaceWithUnderscore(String line)
line
- The string to formatpublic static String timestamp()
public static boolean isUrl(String possibleUrl)
possibleUrl
- the string to verify a urlpublic static String parseEnvironmentVariable(String envVar) throws ParseException
ParseException
Copyright © 2016–2023. All rights reserved.