Remove hand-written ServiceLoader services
[bgpcep.git] / bgp / extensions / labeled-unicast / src / main / java / org / opendaylight / protocol / bgp / labeled / unicast / 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.labeled.unicast;
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.http.openconfig.net.yang.bgp.types.rev151009.IPV4LABELLEDUNICAST;
16 import org.opendaylight.yang.gen.v1.http.openconfig.net.yang.bgp.types.rev151009.IPV6LABELLEDUNICAST;
17 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev180329.LabeledUnicastSubsequentAddressFamily;
18 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev200120.Ipv4AddressFamily;
19 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev200120.Ipv6AddressFamily;
20 import org.opendaylight.yangtools.concepts.AbstractRegistration;
21
22 @MetaInfServices(value = BGPTableTypeRegistryProviderActivator.class)
23 public final class TableTypeActivator extends AbstractBGPTableTypeRegistryProviderActivator {
24     @Override
25     protected List<AbstractRegistration> startBGPTableTypeRegistryProviderImpl(
26             final BGPTableTypeRegistryProvider provider) {
27         return List.of(
28                 provider.registerBGPTableType(Ipv4AddressFamily.class, LabeledUnicastSubsequentAddressFamily.class,
29                     IPV4LABELLEDUNICAST.class),
30                 provider.registerBGPTableType(Ipv6AddressFamily.class, LabeledUnicastSubsequentAddressFamily.class,
31                     IPV6LABELLEDUNICAST.class));
32     }
33 }