public enum DefaultMessageSerializer extends Enum<DefaultMessageSerializer> implements IMessageSerializer
| Enum Constant and Description |
|---|
INSTANCE
单利
|
| Modifier and Type | Method and Description |
|---|---|
Message |
deserialize(byte[] data)
消息反序列化
|
byte[] |
serialize(Message message)
消息序列化
|
static DefaultMessageSerializer |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static DefaultMessageSerializer[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final DefaultMessageSerializer INSTANCE
public static DefaultMessageSerializer[] values()
for (DefaultMessageSerializer c : DefaultMessageSerializer.values()) System.out.println(c);
public static DefaultMessageSerializer valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic byte[] serialize(Message message)
IMessageSerializerserialize in interface IMessageSerializermessage - Messagepublic Message deserialize(byte[] data)
IMessageSerializerdeserialize in interface IMessageSerializerdata - byte arrayCopyright © 2022. All rights reserved.