2 * Copyright (c) 2018 AT&T Intellectual Property. 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.impl.message.update.extended.communities.route.target;
11 import io.netty.buffer.ByteBuf;
12 import org.opendaylight.protocol.bgp.parser.spi.extended.community.FourOctAsCommonECUtil;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev180329.as._4.route.target.extended.community.grouping.As4RouteTargetExtendedCommunity;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev180329.as._4.route.target.extended.community.grouping.As4RouteTargetExtendedCommunityBuilder;
17 * Route Target 4 Octet As Handler.
19 * @author Claudio D. Gasparini
21 public final class As4RouteTargetExtendedHandler {
22 private As4RouteTargetExtendedHandler() {
23 throw new UnsupportedOperationException();
26 public static As4RouteTargetExtendedCommunity parse(final ByteBuf body) {
27 return new As4RouteTargetExtendedCommunityBuilder()
28 .setAs4SpecificCommon(FourOctAsCommonECUtil.parseCommon(body)).build();
31 public static void serialize(final As4RouteTargetExtendedCommunity as4RouteTargetExtendedCommunity,
33 FourOctAsCommonECUtil.serializeCommon(as4RouteTargetExtendedCommunity.getAs4SpecificCommon(), body);