2 * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.protocol.bgp.parser.spi.extended.community;
11 import io.netty.buffer.ByteBuf;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev180329.extended.community.ExtendedCommunity;
15 * The Extended Community serializer (ExtendedCommunity to ByteBuf).
18 public interface ExtendedCommunitySerializer {
21 * Serializes Extended Community value to the buffer.
22 * @param extendedCommunity ExtendedCommuity to be encoded.
23 * @param byteAggregator The output buffer where the extended community is written.
25 void serializeExtendedCommunity(ExtendedCommunity extendedCommunity, ByteBuf byteAggregator);
28 * Provides a type of the extended community for which the serializer is registered.
29 * @param isTransitive Transitivity of the extended community.
30 * @return A type of the extended community.
32 int getType(boolean isTransitive);
35 * Provides a sub-type of the extended community for which the serializer is registered.
36 * @return A sub-type of the extended community.