public enum MessageSerializer extends java.lang.Enum<MessageSerializer>
Connection.| Enum Constant and Description |
|---|
GRADLE_INVOCATION_COMPLETED |
GRADLE_INVOCATION_PARAMETERS |
GRADLE_INVOCATION_STARTED |
STUDIO_AGENT_CONNECTION_PARAMETERS |
STUDIO_CACHE_CLEANUP_COMPLETED |
STUDIO_REQUEST |
STUDIO_SYNC_REQUEST_COMPLETED |
| Modifier and Type | Method and Description |
|---|---|
protected abstract Message |
doReadFrom(Connection connection,
int bodyTimeoutMillis) |
protected abstract void |
doWriteTo(Connection connection,
Message message) |
static MessageSerializer |
getMessageSerializer(byte messageId) |
static MessageSerializer |
getMessageSerializer(java.lang.Class<? extends Message> messageClass) |
Message |
readFrom(Connection connection,
int timeoutMillis)
Reads a message from the given connection.
|
static MessageSerializer |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static MessageSerializer[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
void |
writeTo(Connection connection,
Message message)
Writes a message to the given connection.
|
public static final MessageSerializer GRADLE_INVOCATION_STARTED
public static final MessageSerializer GRADLE_INVOCATION_COMPLETED
public static final MessageSerializer GRADLE_INVOCATION_PARAMETERS
public static final MessageSerializer STUDIO_AGENT_CONNECTION_PARAMETERS
public static final MessageSerializer STUDIO_REQUEST
public static final MessageSerializer STUDIO_SYNC_REQUEST_COMPLETED
public static final MessageSerializer STUDIO_CACHE_CLEANUP_COMPLETED
public static MessageSerializer[] values()
for (MessageSerializer c : MessageSerializer.values()) System.out.println(c);
public static MessageSerializer valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullprotected abstract Message doReadFrom(Connection connection, int bodyTimeoutMillis) throws java.io.IOException
java.io.IOExceptionprotected abstract void doWriteTo(Connection connection, Message message) throws java.io.IOException
java.io.IOExceptionpublic Message readFrom(Connection connection, int timeoutMillis) throws java.io.IOException
java.io.IOExceptionpublic void writeTo(Connection connection, Message message) throws java.io.IOException
java.io.IOExceptionpublic static MessageSerializer getMessageSerializer(java.lang.Class<? extends Message> messageClass)
public static MessageSerializer getMessageSerializer(byte messageId)