Bump upstreams
[openflowplugin.git] / test-provider / src / main / java / org / opendaylight / openflowplugin / test / OpenflowpluginTestRpcProvider.java
index f2307a4ebe1f2b7d6a30cb2903b44dd619887433..2725c293f112c00dbfdf3611f53baeb3fc33f6de 100644 (file)
@@ -7,7 +7,7 @@
  */
 package org.opendaylight.openflowplugin.test;
 
-import com.google.common.collect.ImmutableClassToInstanceMap;
+import java.util.List;
 import java.util.Set;
 import javax.annotation.PreDestroy;
 import javax.inject.Inject;
@@ -22,7 +22,6 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.N
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey;
 import org.opendaylight.yangtools.concepts.Registration;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-import org.opendaylight.yangtools.yang.binding.Rpc;
 import org.osgi.service.component.annotations.Activate;
 import org.osgi.service.component.annotations.Component;
 import org.osgi.service.component.annotations.Deactivate;
@@ -40,21 +39,19 @@ public final class OpenflowpluginTestRpcProvider implements AutoCloseable {
     @Inject
     @Activate
     public OpenflowpluginTestRpcProvider(@Reference final RpcProviderService rpcRegistry) {
-        flowRegistration = rpcRegistry.registerRpcImplementations(ImmutableClassToInstanceMap.<Rpc<?, ?>>builder()
-            .put(AddFlow.class, input -> {
+        flowRegistration = rpcRegistry.registerRpcImplementations(List.of(
+            (AddFlow) input -> {
                 LOG.info("addFlow - {}", input);
                 return null;
-            })
-            .put(RemoveFlow.class, input -> {
+            },
+            (RemoveFlow) input -> {
                 LOG.info("removeFlow - {}", input);
                 return null;
-            })
-            .put(UpdateFlow.class, input -> {
+            },
+            (UpdateFlow) input -> {
                 LOG.info("updateFlow - {}", input);
                 return null;
-            })
-            .build(),
-            Set.of(InstanceIdentifier.create(Nodes.class)
+            }), Set.of(InstanceIdentifier.create(Nodes.class)
                 .child(Node.class, new NodeKey(new NodeId(OpenflowpluginTestActivator.NODE_ID)))));
     }