2 * Copyright (c) 2016 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.openconfig.spi;
10 import java.util.Optional;
11 import org.eclipse.jdt.annotation.NonNull;
12 import org.opendaylight.yang.gen.v1.http.openconfig.net.yang.bgp.types.rev151009.AfiSafiType;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.BgpTableType;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.rib.TablesKey;
17 * Provides access to BGP AFI/SAFI registry.
19 public interface BGPTableTypeRegistryConsumer {
22 * Looks for BgpTableType based on OpenConfig AFI/SAFI.
24 * @param afiSafiType afiSafi Type
25 * @return Optional of BgpTableType or empty, if the table type is not supported.
27 @NonNull Optional<BgpTableType> getTableType(@NonNull Class<? extends AfiSafiType> afiSafiType);
30 * Looks for BgpTableType based on OpenConfig AFI/SAFI.
32 * @param afiSafiType afiSafi Type
33 * @return Optional of TableKey or empty, if the table type is not supported.
35 @NonNull Optional<TablesKey> getTableKey(@NonNull Class<? extends AfiSafiType> afiSafiType);
38 * Looks for AfiSafiType based on BgpTableType.
40 * @param bgpTableType Bgp TableType
41 * @return Optional of OpenConfig AFI/SAFI or empty, if the table type is not supported.
43 @NonNull Optional<Class<? extends AfiSafiType>> getAfiSafiType(@NonNull BgpTableType bgpTableType);
46 * Looks for AfiSafiType based on TablesKey.
48 * @param tablesKey Tables Key
49 * @return Optional of OpenConfig AFI/SAFI or empty, if the table type is not supported.
51 @NonNull Optional<Class<? extends AfiSafiType>> getAfiSafiType(@NonNull TablesKey tablesKey);