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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
apply
(okhttp3.OkHttpClient.Builder builder) Applies this proxy configuration to an OkHttpClientbuilder()
protected boolean
void
Clears the character array storing the proxy password.boolean
okhttp3.Authenticator
@NonNull String
The hostname or IP address of the proxy serverchar[]
The password used to authenticate with the proxy, if applicable@NonNull Integer
getPort()
The port of the proxy servergetProxy()
The username used to authenticate with the proxy, if applicableint
hashCode()
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()
-