Package co.featbit.server
Class Utils
java.lang.Object
co.featbit.server.Utils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic okhttp3.AuthenticatorbuildAuthenticator(String username, String password) static ProxybuildHTTPProxy(String proxyHost, int proxyPort) static voidbuildProxyAndSocketFactoryFor(okhttp3.OkHttpClient.Builder builder, HttpConfig httpConfig) static StringbuildToken(String envSecret) static booleanstatic ThreadFactorycreateThreadFactory(String nameStyle, boolean isDaemon) defaultHeaders(String envSecret) static okhttp3.Headers.BuilderheadersBuilderFor(HttpConfig config) static intintLEFromBytes(byte[] bytes) static booleanstatic booleanstatic voidshutdownOKHttpClient(String name, okhttp3.OkHttpClient client) static voidshutDownThreadPool(String name, ThreadPoolExecutor pool, Duration timeout)
-
Constructor Details
-
Utils
public Utils()
-
-
Method Details
-
defaultHeaders
-
createThreadFactory
-
buildHTTPProxy
-
buildAuthenticator
- Parameters:
username- usernamepassword- password- Returns:
Authenticator
-
headersBuilderFor
-
buildProxyAndSocketFactoryFor
public static void buildProxyAndSocketFactoryFor(okhttp3.OkHttpClient.Builder builder, HttpConfig httpConfig) -
buildToken
-
shutdownOKHttpClient
-
shutDownThreadPool
-
intLEFromBytes
public static int intLEFromBytes(byte[] bytes) -
isUrl
-
checkType
-
isValidEnvSecret
-