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.mdsal.binding.generator.impl.GeneratedClassLoadingStrategy;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.Route;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.rib.Tables;
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.rib.TablesKey;
16 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.rib.tables.Routes;
17 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev200120.AddressFamily;
18 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev200120.SubsequentAddressFamily;
19 import org.opendaylight.yangtools.yang.binding.ChildOf;
20 import org.opendaylight.yangtools.yang.binding.ChoiceIn;
21 import org.opendaylight.yangtools.yang.binding.DataObject;
22 import org.opendaylight.yangtools.yang.binding.Identifiable;
23 import org.opendaylight.yangtools.yang.binding.Identifier;
24 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates;
27 * Interface for acquiring AdjRIBsIn factories. In order for a model-driven RIB implementation to work correctly, it
28 * has to know how to handle individual NLRI fields, whose encoding is specific to a AFI/SAFI pair. This interface
29 * exposes an entry point for locating the AFI/SAFI-specific implementation handler.
31 public interface RIBExtensionConsumerContext {
34 * Acquire a RIB implementation factory for a AFI/SAFI combination.
36 * @param key AFI/SAFI key
37 * @return RIBSupport instance, or null if the AFI/SAFI is not implemented.
39 <C extends Routes & DataObject & ChoiceIn<Tables>, S extends ChildOf<C>,
40 R extends Route & ChildOf<S> & Identifiable<I>, I extends Identifier<R>> @Nullable RIBSupport<C, S, R, I>
41 getRIBSupport(@NonNull TablesKey key);
44 * Acquire a RIB implementation factory for a AFI/SAFI combination.
46 * @param afi Address Family Identifier
47 * @param safi Subsequent Address Family identifier
48 * @return RIBSupport instance, or null if the AFI/SAFI is not implemented.
50 <C extends Routes & DataObject & ChoiceIn<Tables>, S extends ChildOf<C>,
51 R extends Route & ChildOf<S> & Identifiable<I>, I extends Identifier<R>> @Nullable RIBSupport<C, S, R, I>
52 getRIBSupport(@NonNull Class<? extends AddressFamily> afi,
53 @NonNull Class<? extends SubsequentAddressFamily> safi);
56 * Acquire a RIB implementation factory for a AFI/SAFI combination.
58 * @param key Tables key with AFI/SAFI
59 * @return RIBSupport instance, or null if the AFI/SAFI is not implemented.
62 <C extends Routes & DataObject & ChoiceIn<Tables>, S extends ChildOf<C>,
63 R extends Route & ChildOf<S> & Identifiable<I>, I extends Identifier<R>> @Nullable RIBSupport<C, S, R, I>
64 getRIBSupport(@NonNull NodeIdentifierWithPredicates key);
68 * Returns class loading strategy for loading YANG modeled classes
69 * associated with registered RIB supports.
71 * @return Class loading strategy for loading YANG modeled classes.
73 @NonNull GeneratedClassLoadingStrategy getClassLoadingStrategy();