Interface MessageRegistry
-
- All Known Implementing Classes:
SimpleMessageRegistry
public interface MessageRegistry
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Message
parseMessage(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 Detail
-
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
void serializeMessage(Message message, io.netty.buffer.ByteBuf buffer)
Find serializer for given message. Delegates parsing to found serializer.- Parameters:
message
- to be parsedbuffer
- byte buffer that will be filled with serialized message
-
-