*/
package org.opendaylight.protocol.bgp.parser.spi;
+import io.netty.buffer.ByteBuf;
import org.opendaylight.protocol.bgp.parser.BGPDocumentedException;
import org.opendaylight.protocol.bgp.parser.BGPParsingException;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev130919.update.PathAttributesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev130919.path.attributes.AttributesBuilder;
+/**
+ * Common interface for attribute parser implementation.
+ */
public interface AttributeParser {
- void parseAttribute(final byte[] bytes, PathAttributesBuilder builder) throws BGPDocumentedException, BGPParsingException;
+ /**
+ * Parses attribute from ByteBuf buffer
+ *
+ * @param buffer encoded attribute body in Bytebuf
+ * @param builder Path attributes builder. Guaranteed to contain all valid attributes whose type is numerically
+ * lower than this attribute's type.
+ */
+ void parseAttribute(final ByteBuf buffer, AttributesBuilder builder) throws BGPDocumentedException, BGPParsingException;
}