Enum Class MessageSerializer

java.lang.Object
java.lang.Enum<MessageSerializer>
org.gradle.profiler.client.protocol.serialization.MessageSerializer
All Implemented Interfaces:
Serializable, Comparable<MessageSerializer>, Constable

public enum MessageSerializer extends Enum<MessageSerializer>
Message serializers that read and write messages from and to a Connection.
  • Enum Constant Details

    • GRADLE_INVOCATION_STARTED

      public static final MessageSerializer GRADLE_INVOCATION_STARTED
    • GRADLE_INVOCATION_COMPLETED

      public static final MessageSerializer GRADLE_INVOCATION_COMPLETED
    • GRADLE_INVOCATION_PARAMETERS

      public static final MessageSerializer GRADLE_INVOCATION_PARAMETERS
    • STUDIO_AGENT_CONNECTION_PARAMETERS

      public static final MessageSerializer STUDIO_AGENT_CONNECTION_PARAMETERS
    • STUDIO_REQUEST

      public static final MessageSerializer STUDIO_REQUEST
    • STUDIO_SYNC_REQUEST_COMPLETED

      public static final MessageSerializer STUDIO_SYNC_REQUEST_COMPLETED
    • STUDIO_CACHE_CLEANUP_COMPLETED

      public static final MessageSerializer STUDIO_CACHE_CLEANUP_COMPLETED
  • Method Details

    • values

      public static MessageSerializer[] 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 MessageSerializer 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
    • doReadFrom

      protected abstract Message doReadFrom(Connection connection, int bodyTimeoutMillis) throws IOException
      Throws:
      IOException
    • doWriteTo

      protected abstract void doWriteTo(Connection connection, Message message) throws IOException
      Throws:
      IOException
    • readFrom

      public Message readFrom(Connection connection, int timeoutMillis) throws IOException
      Reads a message from the given connection.
      Throws:
      IOException
    • writeTo

      public void writeTo(Connection connection, Message message) throws IOException
      Writes a message to the given connection.
      Throws:
      IOException
    • getMessageSerializer

      public static MessageSerializer getMessageSerializer(Class<? extends Message> messageClass)
    • getMessageSerializer

      public static MessageSerializer getMessageSerializer(byte messageId)