Class ProxyInfo
java.lang.Object
org.geysermc.mcprotocollib.network.ProxyInfo
Information describing a network proxy.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionProxyInfo(ProxyInfo.Type type, SocketAddress address) Creates a new unauthenticated ProxyInfo instance.ProxyInfo(ProxyInfo.Type type, SocketAddress address, String username, String password) Creates a new authenticated ProxyInfo instance. -
Method Summary
Modifier and TypeMethodDescriptionGets the proxy's network address.Gets the proxy's authentication password.getType()Gets the proxy's type.Gets the proxy's authentication username.booleanGets whether the proxy is authenticated with.
-
Constructor Details
-
ProxyInfo
Creates a new unauthenticated ProxyInfo instance.- Parameters:
type- Type of proxy.address- Network address of the proxy.
-
ProxyInfo
Creates a new authenticated ProxyInfo instance.- Parameters:
type- Type of proxy.address- Network address of the proxy.username- Username to authenticate with.password- Password to authenticate with.
-
-
Method Details
-
getType
Gets the proxy's type.- Returns:
- The proxy's type.
-
getAddress
Gets the proxy's network address.- Returns:
- The proxy's network address.
-
isAuthenticated
public boolean isAuthenticated()Gets whether the proxy is authenticated with.- Returns:
- Whether to authenticate with the proxy.
-
getUsername
Gets the proxy's authentication username.- Returns:
- The username to authenticate with.
-
getPassword
Gets the proxy's authentication password.- Returns:
- The password to authenticate with.
-