2 * Copyright (c) 2013 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.spi;
10 import org.eclipse.jdt.annotation.NonNull;
11 import org.eclipse.jdt.annotation.Nullable;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.Route;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.rib.Tables;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.rib.TablesKey;
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.rib.tables.Routes;
16 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev200120.AddressFamily;
17 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev200120.SubsequentAddressFamily;
18 import org.opendaylight.yangtools.yang.binding.ChildOf;
19 import org.opendaylight.yangtools.yang.binding.ChoiceIn;
20 import org.opendaylight.yangtools.yang.binding.DataObject;
21 import org.opendaylight.yangtools.yang.binding.Identifiable;
22 import org.opendaylight.yangtools.yang.binding.Identifier;
23 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates;
26 * Interface for acquiring AdjRIBsIn factories. In order for a model-driven RIB implementation to work correctly, it
27 * has to know how to handle individual NLRI fields, whose encoding is specific to a AFI/SAFI pair. This interface
28 * exposes an entry point for locating the AFI/SAFI-specific implementation handler.
30 public interface RIBExtensionConsumerContext {
33 * Acquire a RIB implementation factory for a AFI/SAFI combination.
35 * @param key AFI/SAFI key
36 * @return RIBSupport instance, or null if the AFI/SAFI is not implemented.
38 <C extends Routes & DataObject & ChoiceIn<Tables>, S extends ChildOf<C>,
39 R extends Route & ChildOf<S> & Identifiable<I>, I extends Identifier<R>> @Nullable RIBSupport<C, S, R, I>
40 getRIBSupport(@NonNull TablesKey key);
43 * Acquire a RIB implementation factory for a AFI/SAFI combination.
45 * @param afi Address Family Identifier
46 * @param safi Subsequent Address Family identifier
47 * @return RIBSupport instance, or null if the AFI/SAFI is not implemented.
49 <C extends Routes & DataObject & ChoiceIn<Tables>, S extends ChildOf<C>,
50 R extends Route & ChildOf<S> & Identifiable<I>, I extends Identifier<R>> @Nullable RIBSupport<C, S, R, I>
51 getRIBSupport(@NonNull Class<? extends AddressFamily> afi,
52 @NonNull Class<? extends SubsequentAddressFamily> safi);
55 * Acquire a RIB implementation factory for a AFI/SAFI combination.
57 * @param key Tables key with AFI/SAFI
58 * @return RIBSupport instance, or null if the AFI/SAFI is not implemented.
61 <C extends Routes & DataObject & ChoiceIn<Tables>, S extends ChildOf<C>,
62 R extends Route & ChildOf<S> & Identifiable<I>, I extends Identifier<R>> @Nullable RIBSupport<C, S, R, I>
63 getRIBSupport(@NonNull NodeIdentifierWithPredicates key);