OPNFLWPLUG-1032: Neon-MRI: Bump odlparent, yangtools, mdsal
[openflowplugin.git] / test-provider / src / main / java / org / opendaylight / openflowplugin / test / OpenflowpluginTableFeaturesTestServiceProvider.java
index 9a0e554b6c746be8569fe917035ec0540afa0340..c2c14c7a3bccf265a7655110a30ac614a56cf66c 100644 (file)
@@ -8,10 +8,10 @@
 
 package org.opendaylight.openflowplugin.test;
 
-import java.util.concurrent.Future;
-import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ProviderContext;
+import com.google.common.util.concurrent.ListenableFuture;
 import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.RoutedRpcRegistration;
 import org.opendaylight.controller.sal.binding.api.NotificationProviderService;
+import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeContext;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes;
@@ -37,7 +37,7 @@ public class OpenflowpluginTableFeaturesTestServiceProvider implements
     private NotificationProviderService notificationService;
 
     /**
-     * get table registration
+     * Get table registration.
      *
      * @return {@link #tableRegistration}
      */
@@ -46,9 +46,7 @@ public class OpenflowpluginTableFeaturesTestServiceProvider implements
     }
 
     /**
-     * set {@link #tableRegistration}
-     *
-     * @param tableRegistration
+     * Set {@link #tableRegistration}.
      */
     public void setTableRegistration(
             final RoutedRpcRegistration<SalTableService> tableRegistration) {
@@ -56,7 +54,7 @@ public class OpenflowpluginTableFeaturesTestServiceProvider implements
     }
 
     /**
-     * get notification service
+     * Get notification service.
      *
      * @return {@link #notificationService}
      */
@@ -65,9 +63,7 @@ public class OpenflowpluginTableFeaturesTestServiceProvider implements
     }
 
     /**
-     * set {@link #notificationService}
-     *
-     * @param notificationService
+     * Set {@link #notificationService}.
      */
     public void setNotificationService(
             final NotificationProviderService notificationService) {
@@ -101,33 +97,27 @@ public class OpenflowpluginTableFeaturesTestServiceProvider implements
      * .table.service.rev131026.UpdateTableInput)
      */
     @Override
-    public Future<RpcResult<UpdateTableOutput>> updateTable(
+    public ListenableFuture<RpcResult<UpdateTableOutput>> updateTable(
             UpdateTableInput input) {
-        String plus = ("updateTable - " + input);
-        OpenflowpluginTableFeaturesTestServiceProvider.LOG.info(plus);
+        OpenflowpluginTableFeaturesTestServiceProvider.LOG.info("updateTable - {}", input);
         return null;
     }
 
-    /**
-     * @param ctx
-     * @return {@link ObjectRegistration}
-     */
     public ObjectRegistration<OpenflowpluginTableFeaturesTestServiceProvider> register(
-            final ProviderContext ctx) {
-        RoutedRpcRegistration<SalTableService> addRoutedRpcImplementation = ctx
-                .<SalTableService> addRoutedRpcImplementation(
+            final RpcProviderRegistry rpcRegistry) {
+        RoutedRpcRegistration<SalTableService> addRoutedRpcImplementation = rpcRegistry.addRoutedRpcImplementation(
                         SalTableService.class, this);
 
         setTableRegistration(addRoutedRpcImplementation);
 
         InstanceIdentifierBuilder<Nodes> builder1 = InstanceIdentifier
-                .<Nodes> builder(Nodes.class);
+                .<Nodes>builder(Nodes.class);
 
         NodeId nodeId = new NodeId(OpenflowpluginTestActivator.NODE_ID);
         NodeKey nodeKey = new NodeKey(nodeId);
 
         InstanceIdentifierBuilder<Node> nodeIndentifier = builder1
-                .<Node, NodeKey> child(Node.class, nodeKey);
+                .<Node, NodeKey>child(Node.class, nodeKey);
 
         InstanceIdentifier<Node> instance = nodeIndentifier.build();
 
@@ -143,5 +133,4 @@ public class OpenflowpluginTableFeaturesTestServiceProvider implements
             }
         };
     }
-
 }