Enum Class PipesMessageType
- All Implemented Interfaces:
Serializable,Comparable<PipesMessageType>,Constable
Unified message types for the PipesClient/PipesServer IPC protocol.
Replaces the separate PipesClient.COMMANDS and
PipesServer.PROCESSING_STATUS enums with a single enum
that carries explicit wire bytes, ACK requirements, and exit codes.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescription -
Method Summary
Modifier and TypeMethodDescriptionbytegetByte()Returns the single byte used on the wire for this message type.Returns the exit code the server should use when exiting due to this condition, or empty if this message type does not trigger an exit.static PipesMessageTypelookup(int b) Looks up a message type by its wire byte.booleanReturnstrueif the receiver must send an ACK after reading a message of this type.static PipesMessageTypeReturns the enum constant of this class with the specified name.static PipesMessageType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
PING
-
ACK
-
NEW_REQUEST
-
SHUT_DOWN
-
READY
-
STARTUP_FAILED
-
INTERMEDIATE_RESULT
-
WORKING
-
FINISHED
-
OOM
-
TIMEOUT
-
UNSPECIFIED_CRASH
-
-
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
-
getByte
public byte getByte()Returns the single byte used on the wire for this message type. -
requiresAck
public boolean requiresAck()Returnstrueif the receiver must send an ACK after reading a message of this type. -
getExitCode
Returns the exit code the server should use when exiting due to this condition, or empty if this message type does not trigger an exit. -
lookup
Looks up a message type by its wire byte.- Parameters:
b- the wire byte- Returns:
- the matching message type
- Throws:
IllegalArgumentException- if no type matches
-