Introduce BGPTableType Registry
[bgpcep.git] / bgp / openconfig-spi / src / main / java / org / opendaylight / protocol / bgp / openconfig / spi / BGPTableTypeRegistryConsumer.java
1 /*
2  * Copyright (c) 2016 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8
9 package org.opendaylight.protocol.bgp.openconfig.spi;
10
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;
15
16 /**
17  * Provides access to BGP AFI/SAFI registry.
18  *
19  */
20 public interface BGPTableTypeRegistryConsumer {
21
22     /**
23      * Looks for BgpTableType based on OpenConfig AFI/SAFI.
24      * @param afiSafiType
25      * @return Optional of BgpTableType or empty, if the table type is not supported.
26      */
27     @Nonnull Optional<BgpTableType> getTableType(@Nonnull Class<? extends AfiSafiType> afiSafiType);
28
29     /**
30      * Looks for AfiSafiType based on BgpTableType.
31      * @param bgpTableType
32      * @return Optional of OpenConfig AFI/SAFI or empty, if the table type is not supported.
33      */
34     @Nonnull Optional<Class<? extends AfiSafiType>> getAfiSafiType(@Nonnull BgpTableType bgpTableType);
35
36 }