public interface AttributeParser
AbstractAttributeParser
and provide an RFC7606-compliant interface.Modifier and Type | Method and Description |
---|---|
default boolean |
ignoreDuplicates(@NonNull RevisedErrorHandling errorHandling)
Determine whether a duplicate attribute should be ignored or
BGPError.MALFORMED_ATTR_LIST should be
raised. |
void |
parseAttribute(@NonNull io.netty.buffer.ByteBuf buffer,
@NonNull AttributesBuilder builder,
@Nullable PeerSpecificParserConstraint constraint)
Parses attribute from ByteBuf buffer.
|
default void |
parseAttribute(@NonNull io.netty.buffer.ByteBuf buffer,
@NonNull AttributesBuilder builder,
@NonNull RevisedErrorHandling errorHandling,
@Nullable PeerSpecificParserConstraint constraint)
Parses attribute from ByteBuf buffer with the specified
RevisedErrorHandling . |
void parseAttribute(@NonNull io.netty.buffer.ByteBuf buffer, @NonNull AttributesBuilder builder, @Nullable PeerSpecificParserConstraint constraint) throws BGPDocumentedException, BGPParsingException
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 nullBGPDocumentedException
- when an irrecoverable error occurred which has a BGPError
assignedBGPParsingException
- when a general unspecified parsing error occurs.default void parseAttribute(@NonNull io.netty.buffer.ByteBuf buffer, @NonNull AttributesBuilder builder, @NonNull RevisedErrorHandling errorHandling, @Nullable PeerSpecificParserConstraint constraint) throws BGPDocumentedException, BGPParsingException, BGPTreatAsWithdrawException
RevisedErrorHandling
. Default implementation
ignores error handling and defers to
parseAttribute(ByteBuf, AttributesBuilder, PeerSpecificParserConstraint)
.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 nullBGPDocumentedException
- when an irrecoverable error occurred which has a BGPError
assignedBGPParsingException
- when a general unspecified parsing error occurs.BGPTreatAsWithdrawException
- when parsing according to revised error handling indicates the
message should be treated as withdraw.default boolean ignoreDuplicates(@NonNull RevisedErrorHandling errorHandling)
BGPError.MALFORMED_ATTR_LIST
should be
raised. This is useful for MP_REACH/MP_UNREACH attributes, which need to emit a Notification under RFC7606
rules.errorHandling
- Revised error handling typeCopyright © 2020 OpenDaylight. All rights reserved.