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
9 package org.opendaylight.protocol.bgp.openconfig.spi;
11 import java.util.Optional;
12 import javax.annotation.Nonnull;
13 import org.opendaylight.yang.gen.v1.http.openconfig.net.yang.bgp.types.rev151009.AfiSafiType;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev171207.BgpTableType;
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev171207.rib.TablesKey;
18 * Provides access to BGP AFI/SAFI registry.
20 public interface BGPTableTypeRegistryConsumer {
23 * Looks for BgpTableType based on OpenConfig AFI/SAFI.
26 * @return Optional of BgpTableType or empty, if the table type is not supported.
29 Optional<BgpTableType> getTableType(@Nonnull Class<? extends AfiSafiType> afiSafiType);
32 * Looks for BgpTableType based on OpenConfig AFI/SAFI.
35 * @return Optional of TableKey or empty, if the table type is not supported.
38 Optional<TablesKey> getTableKey(@Nonnull Class<? extends AfiSafiType> afiSafiType);
41 * Looks for AfiSafiType based on BgpTableType.
44 * @return Optional of OpenConfig AFI/SAFI or empty, if the table type is not supported.
47 Optional<Class<? extends AfiSafiType>> getAfiSafiType(@Nonnull BgpTableType bgpTableType);
50 * Looks for AfiSafiType based on TablesKey.
53 * @return Optional of OpenConfig AFI/SAFI or empty, if the table type is not supported.
56 Optional<Class<? extends AfiSafiType>> getAfiSafiType(@Nonnull TablesKey tablesKey);