java.lang.Object
java.lang.Enum<Scheme>
com.github.jh3nd3rs0n.jargyle.client.Scheme
All Implemented Interfaces:
Serializable, Comparable<Scheme>, java.lang.constant.Constable

public enum Scheme extends Enum<Scheme>
Specifies what SOCKS protocol is to be used to access the SOCKS server.
  • Enum Constant Details

    • SOCKS5

      public static final Scheme SOCKS5
      SOCKS protocol version 5.
  • Method Details

    • values

      public static Scheme[] 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

      public static Scheme valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • valueOfString

      public static Scheme valueOfString(String string)
      Returns the enum constant of the provided String representation. An IllegalArgumentException is thrown if there is no enum constant of the provided String representation.
      Parameters:
      string - the provided String representation
      Returns:
      the enum constant of the provided String representation
    • newSocksServerUri

      public abstract SocksServerUri newSocksServerUri(String host)
      Returns a new SocksServerUri with the provided host. An IllegalArgumentException is thrown if the provided host is invalid.
      Parameters:
      host - the provided host
      Returns:
      a new SocksServerUri with the provided host
    • newSocksServerUri

      public abstract SocksServerUri newSocksServerUri(String userInfo, String host)
      Returns a new SocksServerUri with the provided user information and the provided host. An IllegalArgumentException is thrown if the provided user information is invalid or if the provided host is invalid.
      Parameters:
      userInfo - the provided user information
      host - the provided host
      Returns:
      a new SocksServerUri with the provided user information and the provided host
    • newSocksServerUri

      public abstract SocksServerUri newSocksServerUri(String userInfo, String host, int port)
      Returns a new SocksServerUri with the provided user information, the provided host, and the provided port. An IllegalArgumentException is thrown if the provided user information is invalid, if the provided host is invalid, or if the provided port is less than 0 or greater than 65535.
      Parameters:
      userInfo - the provided user information
      host - the provided host
      port - the provided port
      Returns:
      a new SocksServerUri with the provided user information, the provided host, and the provided port
    • newSocksServerUri

      public abstract SocksServerUri newSocksServerUri(String host, int port)
      Returns a new SocksServerUri with the provided host and the provided port. An IllegalArgumentException is thrown if the provided host is invalid or if the provided port is less than 0 or greater than 65535.
      Parameters:
      host - the provided host
      port - the provided port
      Returns:
      a new SocksServerUri with the provided host and the provided port
    • newSocksServerUri

      public abstract SocksServerUri newSocksServerUri(UserInfo userInfo, Host host, Port port)
      Returns a new SocksServerUri with the optionally provided UserInfo, the provided Host, and the optionally provided Port.
      Parameters:
      userInfo - the optionally provided UserInfo (can be null)
      host - the provided Host
      port - the optionally provided Port (can be null)
      Returns:
      a new SocksServerUri with the optionally provided UserInfo, the provided Host, and the optionally provided Port
    • toString

      public String toString()
      Returns the String representation of this Scheme.
      Overrides:
      toString in class Enum<Scheme>
      Returns:
      the String representation of this Scheme