Class AbstractAttributeParser
java.lang.Object
org.opendaylight.protocol.bgp.parser.spi.AbstractAttributeParser
- All Implemented Interfaces:
AttributeParser
- Direct Known Subclasses:
AggregatorAttributeParser
,AsPathAttributeParser
,AtomicAggregateAttributeParser
,ClusterIdAttributeParser
,CommunitiesAttributeParser
,ExtendedCommunitiesAttributeParser
,LinkstateAttributeParser
,LocalPreferenceAttributeParser
,MultiExitDiscriminatorAttributeParser
,NextHopAttributeParser
,OriginatorIdAttributeParser
,OriginAttributeParser
,PEDistinguisherLabelsAttributeHandler
,ReachAttributeParser
Abstract base class for AttributeParsers which are aware of
RevisedErrorHandling
. Inheriting from this class
requires that parseAttribute(ByteBuf, AttributesBuilder, RevisedErrorHandling, PeerSpecificParserConstraint)
is provided and the simplified parseAttribute(ByteBuf, AttributesBuilder, PeerSpecificParserConstraint)
is implemented by this class.- Author:
- Robert Varga
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal void
parseAttribute
(io.netty.buffer.ByteBuf buffer, AttributesBuilder builder, PeerSpecificParserConstraint constraint) Parses attribute from ByteBuf buffer.abstract void
parseAttribute
(io.netty.buffer.ByteBuf buffer, AttributesBuilder builder, RevisedErrorHandling errorHandling, PeerSpecificParserConstraint constraint) Parses attribute from ByteBuf buffer with the specifiedRevisedErrorHandling
.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 Details
-
AbstractAttributeParser
public AbstractAttributeParser()
-
-
Method Details
-
parseAttribute
public final void parseAttribute(io.netty.buffer.ByteBuf buffer, AttributesBuilder builder, PeerSpecificParserConstraint constraint) throws BGPDocumentedException, BGPParsingException Description copied from interface:AttributeParser
Parses attribute from ByteBuf buffer.- Specified by:
parseAttribute
in interfaceAttributeParser
- 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.constraint
- Peer specific constraints, may be null- Throws:
BGPDocumentedException
- when an irrecoverable error occurred which has aBGPError
assignedBGPParsingException
- when a general unspecified parsing error occurs.
-
parseAttribute
public abstract void parseAttribute(io.netty.buffer.ByteBuf buffer, AttributesBuilder builder, RevisedErrorHandling errorHandling, PeerSpecificParserConstraint constraint) throws BGPDocumentedException, BGPParsingException, BGPTreatAsWithdrawException Description copied from interface:AttributeParser
Parses attribute from ByteBuf buffer with the specifiedRevisedErrorHandling
. Default implementation ignores error handling and defers toAttributeParser.parseAttribute(ByteBuf, AttributesBuilder, PeerSpecificParserConstraint)
.- Specified by:
parseAttribute
in interfaceAttributeParser
- 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:
BGPDocumentedException
- when an irrecoverable error occurred which has aBGPError
assignedBGPParsingException
- when a general unspecified parsing error occurs.BGPTreatAsWithdrawException
- when parsing according to revised error handling indicates the message should be treated as withdraw.
-