- All Implemented Interfaces:
Serializable
,Comparable<MessageType>
The types of serializations.
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract Message
Deprecated.abstract Message
decode
(ByteArray encodedMessage, IOSupplier<TempFileContext> tempFileContextSupplier) Constructs a message of this type from its byte array encoding using the providedtemporary file context
supplier as-needed.final Message
decode
(ByteArray encodedMessage, TempFileContext tempFileContext) Deprecated.Please useTempFileContext
supplier which may defer creation until first needed.abstract Message
Deprecated.Please useTempFileContext
supplier sinceFile.deleteOnExit()
is prone to memory leaks in long-running applications.abstract Message
decode
(String encodedMessage, IOSupplier<TempFileContext> tempFileContextSupplier) Constructs a message of this type from its string encoding using the providedtemporary file context
supplier as-needed.final Message
decode
(String encodedMessage, TempFileContext tempFileContext) Deprecated.Please useTempFileContext
supplier which may defer creation until first needed.static MessageType
getFromTypeByte
(byte typeByte) Gets the message type for its numeric code.static MessageType
getFromTypeChar
(char typeChar) Gets the message type for its character code.abstract byte
Gets the single byte that uniquely represents this message type.abstract char
Gets the single character that uniquely represents this message type.static MessageType
Returns the enum constant of this type with the specified name.static MessageType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
BYTE_ARRAY
-
FILE
-
STRING
-
MULTI
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException
- if the argument is null
-
getFromTypeByte
Gets the message type for its numeric code. -
getFromTypeChar
Gets the message type for its character code. -
getTypeByte
public abstract byte getTypeByte()Gets the single byte that uniquely represents this message type. -
getTypeChar
public abstract char getTypeChar()Gets the single character that uniquely represents this message type. -
decode
public abstract Message decode(String encodedMessage, IOSupplier<TempFileContext> tempFileContextSupplier) throws IOException Constructs a message of this type from its string encoding using the providedtemporary file context
supplier as-needed.- Throws:
IOException
-
decode
@Deprecated public final Message decode(String encodedMessage, TempFileContext tempFileContext) throws IOException Deprecated.Please useTempFileContext
supplier which may defer creation until first needed.Constructs a message of this type from its string encoding using the providedtemporary file context
as-needed.- Throws:
IOException
- See Also:
-
decode
Deprecated.Please useTempFileContext
supplier sinceFile.deleteOnExit()
is prone to memory leaks in long-running applications.Constructs a message of this type from its string encoding, possibly using temporary files withFile.deleteOnExit()
as-needed.- Throws:
IOException
- See Also:
-
decode
public abstract Message decode(ByteArray encodedMessage, IOSupplier<TempFileContext> tempFileContextSupplier) throws IOException Constructs a message of this type from its byte array encoding using the providedtemporary file context
supplier as-needed.- Throws:
IOException
-
decode
@Deprecated public final Message decode(ByteArray encodedMessage, TempFileContext tempFileContext) throws IOException Deprecated.Please useTempFileContext
supplier which may defer creation until first needed.Constructs a message of this type from its byte array encoding using the providedtemporary file context
as-needed.- Throws:
IOException
- See Also:
-
decode
Deprecated.Please useTempFileContext
supplier sinceFile.deleteOnExit()
is prone to memory leaks in long-running applications.Constructs a message of this type from its byte array encoding, possibly using temporary files withFile.deleteOnExit()
as-needed.- Throws:
IOException
- See Also:
-
TempFileContext
supplier sinceFile.deleteOnExit()
is prone to memory leaks in long-running applications.