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