Interface MessageRegistry
- All Known Implementing Classes:
SimpleMessageRegistry
public interface MessageRegistry
-
Method Summary
Modifier and TypeMethodDescriptionparseMessage
(int messageType, io.netty.buffer.ByteBuf buffer, List<Message> errors) Finds parser for given message type in the registry.void
serializeMessage
(Message message, io.netty.buffer.ByteBuf buffer) Find serializer for given message.
-
Method Details
-
parseMessage
Message parseMessage(int messageType, io.netty.buffer.ByteBuf buffer, List<Message> errors) throws PCEPDeserializerException Finds parser for given message type in the registry. Delegates parsing to found parser.- Parameters:
messageType
- message type, key in parser registrybuffer
- message wrapped in ByteBuferrors
- list of error messages, that is filled during parsing- Returns:
- null if the parser for this message could not be found
- Throws:
PCEPDeserializerException
- if the parsing did not succeed
-
serializeMessage
Find serializer for given message. Delegates parsing to found serializer.- Parameters:
message
- to be parsedbuffer
- byte buffer that will be filled with serialized message
-