Class Stateful07SrpObjectParser
- java.lang.Object
-
- org.opendaylight.protocol.pcep.spi.CommonObjectParser
-
- org.opendaylight.protocol.pcep.spi.AbstractObjectWithTlvsParser<TlvsBuilder>
-
- org.opendaylight.protocol.pcep.ietf.stateful07.Stateful07SrpObjectParser
-
- All Implemented Interfaces:
ObjectParser
,ObjectSerializer
- Direct Known Subclasses:
CInitiated00SrpObjectParser
public class Stateful07SrpObjectParser extends AbstractObjectWithTlvsParser<TlvsBuilder>
Parser forSrp
.
-
-
Field Summary
Fields Modifier and Type Field Description protected static int
FLAGS_SIZE
protected static int
MIN_SIZE
protected static int
SRP_ID_SIZE
-
Constructor Summary
Constructors Modifier Constructor Description protected
Stateful07SrpObjectParser(TlvRegistry tlvReg, VendorInformationTlvRegistry viTlvReg)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addTlv(TlvsBuilder builder, Tlv tlv)
protected void
addVendorInformationTlvs(TlvsBuilder builder, List<VendorInformationTlv> tlvs)
protected void
parseFlags(SrpBuilder builder, io.netty.buffer.ByteBuf bytes)
Srp
parseObject(ObjectHeader header, io.netty.buffer.ByteBuf bytes)
protected void
serializeFlags(Srp srp, io.netty.buffer.ByteBuf body)
void
serializeObject(Object object, io.netty.buffer.ByteBuf buffer)
Serializes given object to bytes wrapped in given ByteBuf.void
serializeTlvs(Tlvs tlvs, io.netty.buffer.ByteBuf body)
-
Methods inherited from class org.opendaylight.protocol.pcep.spi.AbstractObjectWithTlvsParser
parseTlvs, serializeTlv, serializeVendorInformationTlvs
-
Methods inherited from class org.opendaylight.protocol.pcep.spi.CommonObjectParser
getObjectClass, getObjectType
-
-
-
-
Field Detail
-
FLAGS_SIZE
protected static final int FLAGS_SIZE
- See Also:
- Constant Field Values
-
SRP_ID_SIZE
protected static final int SRP_ID_SIZE
- See Also:
- Constant Field Values
-
MIN_SIZE
protected static final int MIN_SIZE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Stateful07SrpObjectParser
protected Stateful07SrpObjectParser(TlvRegistry tlvReg, VendorInformationTlvRegistry viTlvReg)
-
-
Method Detail
-
parseObject
public Srp parseObject(ObjectHeader header, io.netty.buffer.ByteBuf bytes) throws PCEPDeserializerException
- Throws:
PCEPDeserializerException
-
parseFlags
protected void parseFlags(SrpBuilder builder, io.netty.buffer.ByteBuf bytes)
-
addTlv
public void addTlv(TlvsBuilder builder, Tlv tlv)
- Overrides:
addTlv
in classAbstractObjectWithTlvsParser<TlvsBuilder>
-
serializeObject
public void serializeObject(Object object, io.netty.buffer.ByteBuf buffer)
Description copied from interface:ObjectSerializer
Serializes given object to bytes wrapped in given ByteBuf.- Parameters:
object
- PCEP object to be serializedbuffer
- ByteBuf wrapper around serialized object
-
serializeFlags
protected void serializeFlags(Srp srp, io.netty.buffer.ByteBuf body)
-
serializeTlvs
public void serializeTlvs(Tlvs tlvs, io.netty.buffer.ByteBuf body)
-
addVendorInformationTlvs
protected final void addVendorInformationTlvs(TlvsBuilder builder, List<VendorInformationTlv> tlvs)
- Specified by:
addVendorInformationTlvs
in classAbstractObjectWithTlvsParser<TlvsBuilder>
-
-