Enum Class Scheme
- All Implemented Interfaces:
Serializable
,Comparable<Scheme>
,java.lang.constant.Constable
Specifies what SOCKS protocol is to be used to access the SOCKS server.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract SocksServerUri
newSocksServerUri
(UserInfo userInfo, Host host, Port port) Returns a newSocksServerUri
with the optionally providedUserInfo
, the providedHost
, and the optionally providedPort
.abstract SocksServerUri
newSocksServerUri
(String host) Returns a newSocksServerUri
with the provided host.abstract SocksServerUri
newSocksServerUri
(String host, int port) Returns a newSocksServerUri
with the provided host and the provided port.abstract SocksServerUri
newSocksServerUri
(String userInfo, String host) Returns a newSocksServerUri
with the provided user information and the provided host.abstract SocksServerUri
newSocksServerUri
(String userInfo, String host, int port) Returns a newSocksServerUri
with the provided user information, the provided host, and the provided port.toString()
Returns theString
representation of thisScheme
.static Scheme
Returns the enum constant of this class with the specified name.static Scheme
valueOfString
(String string) Returns the enum constant of the providedString
representation.static Scheme[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SOCKS5
SOCKS protocol version 5.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-
valueOfString
Returns the enum constant of the providedString
representation. AnIllegalArgumentException
is thrown if there is no enum constant of the providedString
representation.- Parameters:
string
- the providedString
representation- Returns:
- the enum constant of the provided
String
representation
-
newSocksServerUri
Returns a newSocksServerUri
with the provided host. AnIllegalArgumentException
is thrown if the provided host is invalid.- Parameters:
host
- the provided host- Returns:
- a new
SocksServerUri
with the provided host
-
newSocksServerUri
Returns a newSocksServerUri
with the provided user information and the provided host. AnIllegalArgumentException
is thrown if the provided user information is invalid or if the provided host is invalid.- Parameters:
userInfo
- the provided user informationhost
- the provided host- Returns:
- a new
SocksServerUri
with the provided user information and the provided host
-
newSocksServerUri
Returns a newSocksServerUri
with the provided user information, the provided host, and the provided port. AnIllegalArgumentException
is thrown if the provided user information is invalid, if the provided host is invalid, or if the provided port is less than0
or greater than65535
.- Parameters:
userInfo
- the provided user informationhost
- the provided hostport
- the provided port- Returns:
- a new
SocksServerUri
with the provided user information, the provided host, and the provided port
-
newSocksServerUri
Returns a newSocksServerUri
with the provided host and the provided port. AnIllegalArgumentException
is thrown if the provided host is invalid or if the provided port is less than0
or greater than65535
.- Parameters:
host
- the provided hostport
- the provided port- Returns:
- a new
SocksServerUri
with the provided host and the provided port
-
newSocksServerUri
Returns a newSocksServerUri
with the optionally providedUserInfo
, the providedHost
, and the optionally providedPort
.- Parameters:
userInfo
- the optionally providedUserInfo
(can benull
)host
- the providedHost
port
- the optionally providedPort
(can benull
)- Returns:
- a new
SocksServerUri
with the optionally providedUserInfo
, the providedHost
, and the optionally providedPort
-
toString
Returns theString
representation of thisScheme
.
-