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
8 package org.opendaylight.protocol.bgp.rib.impl.spi;
10 import org.opendaylight.mdsal.binding.dom.codec.api.BindingCodecTree;
11 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev180329.path.attributes.Attributes;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpReachNlri;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpUnreachNlri;
14 import org.opendaylight.yangtools.yang.data.api.schema.ContainerNode;
15 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
18 * Common interface for Codecs classes.
21 public interface Codecs {
23 * Called when Codec tree is updated. Implementations should refresh codec context.
25 * @param tree BindingCodecTree
27 void onCodecTreeUpdated(BindingCodecTree tree);
29 ContainerNode serializeUnreachNlri(MpUnreachNlri nlri);
31 ContainerNode serializeReachNlri(MpReachNlri nlri);
33 Attributes deserializeAttributes(NormalizedNode<?,?> attributes);
35 ContainerNode serializeAttributes(Attributes pathAttr);