Remove hand-written ServiceLoader services
[bgpcep.git] / bgp / extensions / flowspec / src / main / java / org / opendaylight / protocol / bgp / flowspec / TableTypeActivator.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 package org.opendaylight.protocol.bgp.flowspec;
9
10 import java.util.List;
11 import org.kohsuke.MetaInfServices;
12 import org.opendaylight.protocol.bgp.openconfig.spi.AbstractBGPTableTypeRegistryProviderActivator;
13 import org.opendaylight.protocol.bgp.openconfig.spi.BGPTableTypeRegistryProvider;
14 import org.opendaylight.protocol.bgp.openconfig.spi.BGPTableTypeRegistryProviderActivator;
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev200120.FlowspecL3vpnSubsequentAddressFamily;
16 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev200120.FlowspecSubsequentAddressFamily;
17 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.openconfig.extensions.rev180329.IPV4FLOW;
18 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.openconfig.extensions.rev180329.IPV4L3VPNFLOW;
19 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.openconfig.extensions.rev180329.IPV6FLOW;
20 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.openconfig.extensions.rev180329.IPV6L3VPNFLOW;
21 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev200120.Ipv4AddressFamily;
22 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev200120.Ipv6AddressFamily;
23 import org.opendaylight.yangtools.concepts.AbstractRegistration;
24
25 @MetaInfServices(value = BGPTableTypeRegistryProviderActivator.class)
26 public final class TableTypeActivator extends AbstractBGPTableTypeRegistryProviderActivator {
27     @Override
28     protected List<AbstractRegistration> startBGPTableTypeRegistryProviderImpl(
29             final BGPTableTypeRegistryProvider provider) {
30         return List.of(
31             provider.registerBGPTableType(Ipv4AddressFamily.class, FlowspecSubsequentAddressFamily.class,
32                 IPV4FLOW.class),
33             provider.registerBGPTableType(Ipv6AddressFamily.class, FlowspecSubsequentAddressFamily.class,
34                 IPV6FLOW.class),
35             provider.registerBGPTableType(Ipv4AddressFamily.class, FlowspecL3vpnSubsequentAddressFamily.class,
36                 IPV4L3VPNFLOW.class),
37             provider.registerBGPTableType(Ipv6AddressFamily.class, FlowspecL3vpnSubsequentAddressFamily.class,
38                 IPV6L3VPNFLOW.class));
39     }
40 }