Enum Class MessageSerializer
java.lang.Object
java.lang.Enum<MessageSerializer>
org.gradle.profiler.client.protocol.serialization.MessageSerializer
- All Implemented Interfaces:
Serializable,Comparable<MessageSerializer>,Constable
Message serializers that read and write messages from and to a
Connection.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract MessagedoReadFrom(Connection connection, int bodyTimeoutMillis) protected abstract voiddoWriteTo(Connection connection, Message message) static MessageSerializergetMessageSerializer(byte messageId) static MessageSerializergetMessageSerializer(Class<? extends Message> messageClass) readFrom(Connection connection, int timeoutMillis) Reads a message from the given connection.static MessageSerializerReturns the enum constant of this class with the specified name.static MessageSerializer[]values()Returns an array containing the constants of this enum class, in the order they are declared.voidwriteTo(Connection connection, Message message) Writes a message to the given connection.
-
Enum Constant Details
-
GRADLE_INVOCATION_STARTED
-
GRADLE_INVOCATION_COMPLETED
-
GRADLE_INVOCATION_PARAMETERS
-
STUDIO_AGENT_CONNECTION_PARAMETERS
-
STUDIO_REQUEST
-
STUDIO_SYNC_REQUEST_COMPLETED
-
STUDIO_CACHE_CLEANUP_COMPLETED
-
-
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
-
doReadFrom
protected abstract Message doReadFrom(Connection connection, int bodyTimeoutMillis) throws IOException - Throws:
IOException
-
doWriteTo
- Throws:
IOException
-
readFrom
Reads a message from the given connection.- Throws:
IOException
-
writeTo
Writes a message to the given connection.- Throws:
IOException
-
getMessageSerializer
-
getMessageSerializer
-