Enum VpnError
- All Implemented Interfaces:
Comparable<VpnError>
Typed error codes carried by
VpnException. Branch on these rather than
on the message.-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe credentials were refused by the server.The tunnel could not be established -- unreachable server, no network, or a negotiation failure.The configuration was rejected: a malformed server address, an authentication method the platform does not offer, or a certificate it could not read.No configuration is installed, so there was nothing to act on.VPN management is not available on this port or this OS version.The platform never answered within the safety timeout.The app is missing the entitlement or permission the platform requires.Nothing more specific is known.The user declined the system prompt that has to precede installing a configuration. -
Method Summary
Methods inherited from class Enum
clone, compareTo, equals, getDeclaringClass, getEnumValues, hashCode, name, ordinal, setEnumValues, toString, valueOf
-
Enum Constant Details
-
NOT_SUPPORTED
VPN management is not available on this port or this OS version. Android needs API 30 for the managed profile API; the desktop and browser ports have no equivalent at all. -
USER_DECLINED
The user declined the system prompt that has to precede installing a configuration. Both platforms show one, and neither lets an app install a VPN without it. -
INVALID_CONFIGURATION
The configuration was rejected: a malformed server address, an authentication method the platform does not offer, or a certificate it could not read. -
AUTHENTICATION_FAILED
The credentials were refused by the server. -
CONNECTION_FAILED
The tunnel could not be established -- unreachable server, no network, or a negotiation failure. -
UNAUTHORIZED
The app is missing the entitlement or permission the platform requires. On iOS this usually means the Personal VPN capability is not enabled on the App ID. -
NOT_CONFIGURED
No configuration is installed, so there was nothing to act on. -
TIMEOUT
The platform never answered within the safety timeout. -
UNKNOWN
Nothing more specific is known.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-