X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=test-provider%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fopenflowplugin%2Ftest%2FOpenflowpluginTableFeaturesTestServiceProvider.java;h=c2c14c7a3bccf265a7655110a30ac614a56cf66c;hb=b4f4b4b702e2ccd8a7c62fd2a5c184c5b1cbe665;hp=9a0e554b6c746be8569fe917035ec0540afa0340;hpb=70c266f1eef0a823f29c4ad119a1e8f7e6164507;p=openflowplugin.git diff --git a/test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowpluginTableFeaturesTestServiceProvider.java b/test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowpluginTableFeaturesTestServiceProvider.java index 9a0e554b6c..c2c14c7a3b 100644 --- a/test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowpluginTableFeaturesTestServiceProvider.java +++ b/test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowpluginTableFeaturesTestServiceProvider.java @@ -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 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> updateTable( + public ListenableFuture> 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 register( - final ProviderContext ctx) { - RoutedRpcRegistration addRoutedRpcImplementation = ctx - . addRoutedRpcImplementation( + final RpcProviderRegistry rpcRegistry) { + RoutedRpcRegistration addRoutedRpcImplementation = rpcRegistry.addRoutedRpcImplementation( SalTableService.class, this); setTableRegistration(addRoutedRpcImplementation); InstanceIdentifierBuilder builder1 = InstanceIdentifier - . builder(Nodes.class); + .builder(Nodes.class); NodeId nodeId = new NodeId(OpenflowpluginTestActivator.NODE_ID); NodeKey nodeKey = new NodeKey(nodeId); InstanceIdentifierBuilder nodeIndentifier = builder1 - . child(Node.class, nodeKey); + .child(Node.class, nodeKey); InstanceIdentifier instance = nodeIndentifier.build(); @@ -143,5 +133,4 @@ public class OpenflowpluginTableFeaturesTestServiceProvider implements } }; } - }