Class LinkstateAttributeParser
- java.lang.Object
-
- org.opendaylight.protocol.bgp.parser.spi.AbstractAttributeParser
-
- org.opendaylight.protocol.bgp.linkstate.impl.attribute.LinkstateAttributeParser
-
- All Implemented Interfaces:
AttributeParser,AttributeSerializer
public final class LinkstateAttributeParser extends AbstractAttributeParser implements AttributeSerializer
Parser for Link State Path Attribute.- See Also:
- BGP-LS draft
-
-
Constructor Summary
Constructors Constructor Description LinkstateAttributeParser(boolean isIanaAssignedType, RSVPTeObjectRegistry rsvpTeObjectRegistry)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetType()voidparseAttribute(io.netty.buffer.ByteBuf buffer, AttributesBuilder builder, RevisedErrorHandling errorHandling, PeerSpecificParserConstraint constraint)Parses attribute from ByteBuf buffer with the specifiedRevisedErrorHandling.voidserializeAttribute(Attributes attribute, io.netty.buffer.ByteBuf byteAggregator)Serialize linkstate attributes.-
Methods inherited from class org.opendaylight.protocol.bgp.parser.spi.AbstractAttributeParser
parseAttribute
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.opendaylight.protocol.bgp.parser.spi.AttributeParser
ignoreDuplicates
-
-
-
-
Constructor Detail
-
LinkstateAttributeParser
public LinkstateAttributeParser(boolean isIanaAssignedType, RSVPTeObjectRegistry rsvpTeObjectRegistry)
-
-
Method Detail
-
getType
public int getType()
-
parseAttribute
public void parseAttribute(io.netty.buffer.ByteBuf buffer, AttributesBuilder builder, RevisedErrorHandling errorHandling, PeerSpecificParserConstraint constraint) throws BGPParsingExceptionDescription copied from interface:AttributeParserParses attribute from ByteBuf buffer with the specifiedRevisedErrorHandling. Default implementation ignores error handling and defers toAttributeParser.parseAttribute(ByteBuf, AttributesBuilder, PeerSpecificParserConstraint).- Specified by:
parseAttributein interfaceAttributeParser- Specified by:
parseAttributein classAbstractAttributeParser- Parameters:
buffer- Encoded attribute body in ByteBuf.builder- Path attributes builder. Guaranteed to contain all valid attributes whose type is numerically lower than this attribute's type.errorHandling- RFC7606 error handling typeconstraint- Peer specific constraints, may be null- Throws:
BGPParsingException- when a general unspecified parsing error occurs.
-
serializeAttribute
public void serializeAttribute(Attributes attribute, io.netty.buffer.ByteBuf byteAggregator)
Serialize linkstate attributes.- Specified by:
serializeAttributein interfaceAttributeSerializer- Parameters:
attribute- DataObject representing LinkstatePathAttributebyteAggregator- ByteBuf where all serialized data are aggregated
-
-