T
- Common supertype for all message types, supported by this protocol.public interface Protocol<T>
Modifier and Type | Method and Description |
---|---|
Collection<Class<? extends T>> |
getSupportedTypes() |
Class<? extends T> |
readMessageType(ByteBufferView buffer)
Tries to determine the message type based on the (part of the) message available in the byte buffer.
|
Collection<Class<? extends T>> getSupportedTypes()
Class<? extends T> readMessageType(ByteBufferView buffer)
buffer
- Byte buffer of arbitrary length containing (a part of) the message.
Decoding should be performed starting with the current position of the buffer.InvalidMessageException
- if prefix is invalid or the message type is not supportedCopyright © 2016–2021. All rights reserved.