X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=binding%2Fmdsal-binding-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fmdsal%2Fbinding%2Fapi%2FInstanceNotificationService.java;h=7c3bc1383d2b7feed6600aa4d4c04110afbfbaf8;hb=refs%2Fchanges%2F35%2F100435%2F10;hp=b8fb57828f562a44bc4a1102d6b177b64beb1c88;hpb=bbeab46ecd97d5f4b48385e174f0ef988f029ef7;p=mdsal.git diff --git a/binding/mdsal-binding-api/src/main/java/org/opendaylight/mdsal/binding/api/InstanceNotificationService.java b/binding/mdsal-binding-api/src/main/java/org/opendaylight/mdsal/binding/api/InstanceNotificationService.java index b8fb57828f..7c3bc1383d 100644 --- a/binding/mdsal-binding-api/src/main/java/org/opendaylight/mdsal/binding/api/InstanceNotificationService.java +++ b/binding/mdsal-binding-api/src/main/java/org/opendaylight/mdsal/binding/api/InstanceNotificationService.java @@ -16,7 +16,9 @@ import org.opendaylight.yangtools.concepts.Registration; import org.opendaylight.yangtools.yang.binding.DataObject; import org.opendaylight.yangtools.yang.binding.Identifiable; import org.opendaylight.yangtools.yang.binding.Identifier; +import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.opendaylight.yangtools.yang.binding.InstanceNotification; +import org.opendaylight.yangtools.yang.binding.KeyedInstanceIdentifier; import org.opendaylight.yangtools.yang.binding.KeyedListNotification; /** @@ -26,23 +28,22 @@ import org.opendaylight.yangtools.yang.binding.KeyedListNotification; @Beta public interface InstanceNotificationService extends BindingService { -

, T extends Listener> - @NonNull Registration registerListener(InstanceNotificationSpec spec, DataTreeIdentifier

path, - T listener, Executor executor); +

> @NonNull Registration registerListener( + InstanceNotificationSpec spec, InstanceIdentifier

path, Listener listener, Executor executor); - default

, T extends Listener> - @NonNull Registration registerListener(final InstanceNotificationSpec spec, - final DataTreeIdentifier

path, final T listener) { + default

> @NonNull Registration registerListener( + final InstanceNotificationSpec spec, final InstanceIdentifier

path, + final Listener listener) { return registerListener(spec, path, listener, MoreExecutors.directExecutor()); } -

, N extends KeyedListNotification, K extends Identifier

, - T extends KeyedListListener> @NonNull Registration registerListener( - InstanceNotificationSpec spec, DataTreeIdentifier

path, T listener, Executor executor); +

, N extends KeyedListNotification, K extends Identifier

> + @NonNull Registration registerListener(InstanceNotificationSpec spec, KeyedInstanceIdentifier path, + KeyedListListener listener, Executor executor); - default

, N extends KeyedListNotification, K extends Identifier

, - T extends KeyedListListener> @NonNull Registration registerListener( - final InstanceNotificationSpec spec, final DataTreeIdentifier

path, final T listener) { + default

, N extends KeyedListNotification, K extends Identifier

> + @NonNull Registration registerListener(final InstanceNotificationSpec spec, + final KeyedInstanceIdentifier path, final KeyedListListener listener) { return registerListener(spec, path, listener, MoreExecutors.directExecutor()); } @@ -57,7 +58,7 @@ public interface InstanceNotificationService extends BindingService { * @param path Instance path * @param notification Notification body */ - void onNotification(@NonNull DataTreeIdentifier

path, @NonNull N notification); + void onNotification(@NonNull InstanceIdentifier

path, @NonNull N notification); } /** @@ -72,7 +73,6 @@ public interface InstanceNotificationService extends BindingService { * @param path Instance path * @param notification Notification body */ - // FIXME: DataTreeIdentifier does not have a Keyed flavor - void onNotification(@NonNull DataTreeIdentifier

path, @NonNull N notification); + void onNotification(@NonNull KeyedInstanceIdentifier path, @NonNull N notification); } }