X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=applications%2Fnotification-supplier%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fopenflowplugin%2Fapplications%2Fnotification%2Fsupplier%2Fimpl%2Fitem%2FFlowNotificationSupplierImpl.java;h=9d2e9fdfcbb9e836061b9c6e08e7fedbcc048a36;hb=cfe3a97837951ebbedb337dc988027f10c49f714;hp=e982146bc75c896f794ab895d976ce0daeec542a;hpb=d1b659a026d853162e6ec765516c814472693c6b;p=openflowplugin.git diff --git a/applications/notification-supplier/src/main/java/org/opendaylight/openflowplugin/applications/notification/supplier/impl/item/FlowNotificationSupplierImpl.java b/applications/notification-supplier/src/main/java/org/opendaylight/openflowplugin/applications/notification/supplier/impl/item/FlowNotificationSupplierImpl.java index e982146bc7..9d2e9fdfcb 100644 --- a/applications/notification-supplier/src/main/java/org/opendaylight/openflowplugin/applications/notification/supplier/impl/item/FlowNotificationSupplierImpl.java +++ b/applications/notification-supplier/src/main/java/org/opendaylight/openflowplugin/applications/notification/supplier/impl/item/FlowNotificationSupplierImpl.java @@ -5,12 +5,11 @@ * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ - package org.opendaylight.openflowplugin.applications.notification.supplier.impl.item; import com.google.common.base.Preconditions; -import org.opendaylight.controller.md.sal.binding.api.DataBroker; -import org.opendaylight.controller.sal.binding.api.NotificationProviderService; +import org.opendaylight.mdsal.binding.api.DataBroker; +import org.opendaylight.mdsal.binding.api.NotificationPublishService; import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode; import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.Table; import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow; @@ -27,41 +26,42 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; * Implementation define a contract between {@link Flow} data object * and {@link FlowAdded}, {@link FlowUpdated} and {@link FlowRemoved} notifications. */ -public class FlowNotificationSupplierImpl extends - AbstractNotificationSupplierForItem { +public class FlowNotificationSupplierImpl extends AbstractNotificationSupplierForItem { - private static final InstanceIdentifier wildCardedInstanceIdent = getNodeWildII().augmentation(FlowCapableNode.class).child(Table.class).child(Flow.class); + private static final InstanceIdentifier FLOW_INSTANCE_IDENTIFIER = getNodeWildII() + .augmentation(FlowCapableNode.class).child(Table.class).child(Flow.class); /** - * Constructor register supplier as DataChangeLister and create wildCarded InstanceIdentifier. + * Constructor register supplier as DataTreeChangeListener and create wildCarded InstanceIdentifier. * - * @param notifProviderService - {@link NotificationProviderService} - * @param db - {@link DataBroker} + * @param notifProviderService - {@link NotificationPublishService} + * @param db - {@link DataBroker} */ - public FlowNotificationSupplierImpl(final NotificationProviderService notifProviderService, final DataBroker db) { + public FlowNotificationSupplierImpl(final NotificationPublishService notifProviderService, final DataBroker db) { super(notifProviderService, db, Flow.class); } @Override public InstanceIdentifier getWildCardPath() { - return wildCardedInstanceIdent; + return FLOW_INSTANCE_IDENTIFIER; } @Override - public FlowAdded createNotification(final Flow o, final InstanceIdentifier path) { - Preconditions.checkArgument(o != null); + public FlowAdded createNotification(final Flow dataTreeItemObject, final InstanceIdentifier path) { + Preconditions.checkArgument(dataTreeItemObject != null); Preconditions.checkArgument(path != null); - final FlowAddedBuilder builder = new FlowAddedBuilder(o); + final FlowAddedBuilder builder = new FlowAddedBuilder(dataTreeItemObject); builder.setFlowRef(new FlowRef(path)); builder.setNode(createNodeRef(path)); return builder.build(); } @Override - public FlowUpdated updateNotification(final Flow o, final InstanceIdentifier path) { - Preconditions.checkArgument(o != null); + public FlowUpdated updateNotification(final Flow flow, final InstanceIdentifier path) { + Preconditions.checkArgument(flow != null); Preconditions.checkArgument(path != null); - final FlowUpdatedBuilder builder = new FlowUpdatedBuilder(o); + final FlowUpdatedBuilder builder = new FlowUpdatedBuilder(flow); builder.setFlowRef(new FlowRef(path)); builder.setNode(createNodeRef(path)); return builder.build();