public final class SimpleRROSubobjectRegistry extends Object implements RROSubobjectRegistry
Constructor and Description |
---|
SimpleRROSubobjectRegistry() |
Modifier and Type | Method and Description |
---|---|
SubobjectContainer |
parseSubobject(int type,
io.netty.buffer.ByteBuf buffer)
Finds parser for given subobject type in the registry.
|
AutoCloseable |
registerSubobjectParser(int subobjectType,
RROSubobjectParser parser) |
AutoCloseable |
registerSubobjectSerializer(Class<? extends SubobjectType> subobjectClass,
RROSubobjectSerializer serializer) |
void |
serializeSubobject(SubobjectContainer subobject,
io.netty.buffer.ByteBuf buffer)
Find serializer for given subobject.
|
public AutoCloseable registerSubobjectParser(int subobjectType, RROSubobjectParser parser)
public AutoCloseable registerSubobjectSerializer(Class<? extends SubobjectType> subobjectClass, RROSubobjectSerializer serializer)
public SubobjectContainer parseSubobject(int type, io.netty.buffer.ByteBuf buffer) throws RSVPParsingException
RROSubobjectRegistry
parseSubobject
in interface RROSubobjectRegistry
type
- subobject type, key in parser registrybuffer
- subobject wrapped in ByteBufRSVPParsingException
- if the parsing did not succeedpublic void serializeSubobject(SubobjectContainer subobject, io.netty.buffer.ByteBuf buffer)
RROSubobjectRegistry
serializeSubobject
in interface RROSubobjectRegistry
subobject
- to be parsedbuffer
- buffer where the serialized subobject will be parsedCopyright © 2019 OpenDaylight. All rights reserved.