Fixed cyclic dependency in bgp-rib-impl.
[bgpcep.git] / bgp / rib-impl / src / main / java / org / opendaylight / protocol / bgp / rib / impl / spi / Codecs.java
1 /*
2  * Copyright (c) 2015 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.protocol.bgp.rib.impl.spi;
9
10 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev130919.path.attributes.Attributes;
11 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev130919.update.attributes.MpReachNlri;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev130919.update.attributes.MpUnreachNlri;
13 import org.opendaylight.yangtools.binding.data.codec.api.BindingCodecTree;
14 import org.opendaylight.yangtools.yang.data.api.schema.ContainerNode;
15 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
16
17 /**
18  * Common interface for Codecs classes.
19  *
20  */
21 public interface Codecs {
22     /**
23      * Called when Codec tree is updated. Implementations should
24      * refresh codec context.
25      *
26      * @param tree BindingCodecTree
27      */
28     void onCodecTreeUpdated(final BindingCodecTree tree);
29
30     ContainerNode serializeUnreachNlri(final MpUnreachNlri nlri);
31
32     ContainerNode serializeReachNlri(final MpReachNlri nlri);
33
34     Attributes deserializeAttributes(final NormalizedNode<?,?> attributes);
35
36     ContainerNode serializeAttributes(final Attributes pathAttr);
37 }