- All Superinterfaces:
AutoCloseable,Closeable
- All Known Implementing Classes:
ByteArrayMessage,FileMessage,MultiMessage,StringMessage
Any type of encapsulated message.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()The message should be closed when it is no longer needed.Gets a binary representation of this message.Gets a String representation of this message.booleanTwo messages of the same type with the same body must be considered equal.Gets the message type.inthashCode()The hash code must be consistent with equals.
-
Method Details
-
equals
Two messages of the same type with the same body must be considered equal. -
hashCode
int hashCode()The hash code must be consistent with equals. -
getMessageType
MessageType getMessageType()Gets the message type. -
encodeAsString
Gets a String representation of this message.- Throws:
IOException
-
encodeAsByteArray
Gets a binary representation of this message.- Throws:
IOException
-
close
The message should be closed when it is no longer needed.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
