Add codegen support for nested notifications
[mdsal.git] / binding / yang-binding / src / main / java / org / opendaylight / yangtools / yang / binding / InstanceNotification.java
diff --git a/binding/yang-binding/src/main/java/org/opendaylight/yangtools/yang/binding/InstanceNotification.java b/binding/yang-binding/src/main/java/org/opendaylight/yangtools/yang/binding/InstanceNotification.java
new file mode 100644 (file)
index 0000000..83fd1c8
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2019 PANTHEON.tech, s.r.o. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * 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.yangtools.yang.binding;
+
+import com.google.common.annotations.Beta;
+import org.eclipse.jdt.annotation.NonNull;
+
+/**
+ * Marker interface for YANG-defined instance {@code notification}s. A concrete InstanceNotification and its
+ * implementations may choose to also extend/implement the {@link EventInstantAware} interface. In case they do,
+ * {@link EventInstantAware#eventInstant()} returns the time when this notification was generated.
+ *
+ * @param <N> Concrete notification type
+ * @param <T> Parent data tree instance type
+ */
+@Beta
+public interface InstanceNotification<N extends InstanceNotification<N, T>, T extends DataObject>
+        extends BaseNotification {
+
+    @Override
+    @NonNull Class<N> implementedInterface();
+}