Class ProxyConfig
java.lang.Object
com.github.twitch4j.common.config.ProxyConfig
Wrapper around a HTTP(S) proxy to be used by Twitch4J modules
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionvoidapply(okhttp3.OkHttpClient.Builder builder) Applies this proxy configuration to an OkHttpClientbuilder()protected booleanvoidClears the character array storing the proxy password.booleanokhttp3.Authenticator@NonNull StringThe hostname or IP address of the proxy serverchar[]The password used to authenticate with the proxy, if applicable@NonNull IntegergetPort()The port of the proxy servergetProxy()The username used to authenticate with the proxy, if applicableinthashCode()toString()
-
Method Details
-
apply
public void apply(okhttp3.OkHttpClient.Builder builder) Applies this proxy configuration to an OkHttpClient- Parameters:
builder- the builder of the Http Client
-
clearPassword
public void clearPassword()Clears the character array storing the proxy password. Call this method once the proxy is no longer in use to reduce the likelihood of the password being accessible in memory -
builder
-
getHostname
The hostname or IP address of the proxy server -
getPort
The port of the proxy server -
getUsername
The username used to authenticate with the proxy, if applicable -
getPassword
public char[] getPassword()The password used to authenticate with the proxy, if applicable -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-
getProxy
-
getAuthenticator
public okhttp3.Authenticator getAuthenticator()
-