Enum Class MasterProcessCommand

java.lang.Object
java.lang.Enum<MasterProcessCommand>
org.apache.maven.surefire.booter.MasterProcessCommand
All Implemented Interfaces:
Serializable, Comparable<MasterProcessCommand>, Constable

public enum MasterProcessCommand extends Enum<MasterProcessCommand>
Commands which are sent from plugin to the forked jvm. Support and methods related to the commands.
Since:
2.19
  • Enum Constant Details

  • Field Details

    • id

      private final int id
    • dataType

      private final Class<?> dataType
  • Constructor Details

    • MasterProcessCommand

      private MasterProcessCommand(int id, Class<?> dataType)
  • Method Details

    • values

      public static MasterProcessCommand[] 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 MasterProcessCommand 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
    • getId

      public int getId()
    • getDataType

      public Class<?> getDataType()
    • hasDataType

      public boolean hasDataType()
    • encode

      public byte[] encode(String data)
    • encode

      public byte[] encode()
    • decode

      public static Command decode(DataInputStream is) throws IOException
      Throws:
      IOException
    • toDataTypeAsString

      String toDataTypeAsString(byte... data)
    • fromDataType

      byte[] fromDataType(String data)
    • resolve

      static MasterProcessCommand resolve(int id)
    • setCommandAndDataLength

      static void setCommandAndDataLength(int command, int dataLength, byte... encoded)