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.rev130919.BgpTableType;
17 * Provides access to BGP AFI/SAFI registry.
20 public interface BGPTableTypeRegistryConsumer {
23 * Looks for BgpTableType based on OpenConfig AFI/SAFI.
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 AfiSafiType based on BgpTableType.
32 * @return Optional of OpenConfig AFI/SAFI or empty, if the table type is not supported.
34 @Nonnull Optional<Class<? extends AfiSafiType>> getAfiSafiType(@Nonnull BgpTableType bgpTableType);