2 * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.mdsal.binding.dom.adapter;
10 import java.util.concurrent.Executor;
11 import org.opendaylight.mdsal.binding.api.InstanceNotificationService.Listener;
12 import org.opendaylight.yangtools.yang.binding.DataObject;
13 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
14 import org.opendaylight.yangtools.yang.binding.InstanceNotification;
16 final class InstanceNotificationListenerAdapter<P extends DataObject, N extends InstanceNotification<N, P>>
17 extends AbstractInstanceNotificationListenerAdapter<P, N, Listener<P, N>> {
18 InstanceNotificationListenerAdapter(final AdapterContext adapterContext, final Class<N> notificationClass,
19 final Listener<P, N> delegate, final Executor executor) {
20 super(adapterContext, notificationClass, delegate, executor);
24 @SuppressWarnings("unchecked")
25 void onNotification(final Listener<P, N> delegate, final InstanceIdentifier<?> path, final N notification) {
26 delegate.onNotification((InstanceIdentifier<P>) path, notification);