Enum WireCommandType

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<WireCommandType>

    public enum WireCommandType
    extends java.lang.Enum<WireCommandType>
    The various types of commands that can be sent over the wire. Each has two fields the first is a code that identifies it in the wire protocol. (This is the first thing written) The second is a constructor method, that is used to decode commands of that type. (Types below that are grouped into pairs where there is a corresponding request and reply.)
    • Method Detail

      • values

        public static WireCommandType[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (WireCommandType c : WireCommandType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static WireCommandType valueOf​(java.lang.String name)
        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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • getCode

        public int getCode()