Package org.apache.maven.surefire.booter
Enum MasterProcessCommand
- java.lang.Object
-
- java.lang.Enum<MasterProcessCommand>
-
- org.apache.maven.surefire.booter.MasterProcessCommand
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<MasterProcessCommand>
public enum MasterProcessCommand extends java.lang.Enum<MasterProcessCommand>
Commands which are sent from plugin to the forked jvm. Support and methods related to the commands.- Since:
- 2.19
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BYE_ACK
NOOP
To tell a forked process that the master process is still alive.RUN_CLASS
SHUTDOWN
SKIP_SINCE_NEXT_TEST
TEST_SET_FINISHED
-
Constructor Summary
Constructors Modifier Constructor Description private
MasterProcessCommand(int id, java.lang.Class<?> dataType)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Command
decode(java.io.DataInputStream is)
byte[]
encode()
byte[]
encode(java.lang.String data)
(package private) byte[]
fromDataType(java.lang.String data)
java.lang.Class<?>
getDataType()
int
getId()
boolean
hasDataType()
(package private) static MasterProcessCommand
resolve(int id)
(package private) static void
setCommandAndDataLength(int command, int dataLength, byte... encoded)
(package private) java.lang.String
toDataTypeAsString(byte... data)
static MasterProcessCommand
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static MasterProcessCommand[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
RUN_CLASS
public static final MasterProcessCommand RUN_CLASS
-
TEST_SET_FINISHED
public static final MasterProcessCommand TEST_SET_FINISHED
-
SKIP_SINCE_NEXT_TEST
public static final MasterProcessCommand SKIP_SINCE_NEXT_TEST
-
SHUTDOWN
public static final MasterProcessCommand SHUTDOWN
-
NOOP
public static final MasterProcessCommand NOOP
To tell a forked process that the master process is still alive. Repeated after 10 seconds.
-
BYE_ACK
public static final MasterProcessCommand BYE_ACK
-
-
Method Detail
-
values
public static MasterProcessCommand[] 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 (MasterProcessCommand c : MasterProcessCommand.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static MasterProcessCommand 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 namejava.lang.NullPointerException
- if the argument is null
-
getId
public int getId()
-
getDataType
public java.lang.Class<?> getDataType()
-
hasDataType
public boolean hasDataType()
-
encode
public byte[] encode(java.lang.String data)
-
encode
public byte[] encode()
-
decode
public static Command decode(java.io.DataInputStream is) throws java.io.IOException
- Throws:
java.io.IOException
-
toDataTypeAsString
java.lang.String toDataTypeAsString(byte... data)
-
fromDataType
byte[] fromDataType(java.lang.String data)
-
resolve
static MasterProcessCommand resolve(int id)
-
setCommandAndDataLength
static void setCommandAndDataLength(int command, int dataLength, byte... encoded)
-
-