diff --git a/src/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/examples/CallbackApiExample.java b/src/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/examples/CallbackApiExample.java
index 554a21b..b99979c 100644
--- a/src/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/examples/CallbackApiExample.java
+++ b/src/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/examples/CallbackApiExample.java
@@ -21,9 +21,9 @@
 import io.fd.vpp.jvpp.JVppRegistryImpl;
 import io.fd.vpp.jvpp.VppCallbackException;
 import io.fd.vpp.jvpp.core.JVppCoreImpl;
-import io.fd.vpp.jvpp.core.callback.GetNodeIndexCallback;
-import io.fd.vpp.jvpp.core.callback.ShowVersionCallback;
-import io.fd.vpp.jvpp.core.callback.SwInterfaceCallback;
+import io.fd.vpp.jvpp.core.callback.GetNodeIndexReplyCallback;
+import io.fd.vpp.jvpp.core.callback.ShowVersionReplyCallback;
+import io.fd.vpp.jvpp.core.callback.SwInterfaceDetailsCallback;
 import io.fd.vpp.jvpp.core.dto.GetNodeIndex;
 import io.fd.vpp.jvpp.core.dto.GetNodeIndexReply;
 import io.fd.vpp.jvpp.core.dto.ShowVersion;
@@ -65,7 +65,7 @@
         Thread.sleep(1000);
     }
 
-    static class TestCallback implements GetNodeIndexCallback, ShowVersionCallback, SwInterfaceCallback {
+    static class TestCallback implements GetNodeIndexReplyCallback, ShowVersionReplyCallback, SwInterfaceDetailsCallback {
 
         @Override
         public void onGetNodeIndexReply(final GetNodeIndexReply msg) {
diff --git a/src/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/examples/CallbackJVppFacadeExample.java b/src/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/examples/CallbackJVppFacadeExample.java
index 2f77f0f..dc2bdcb 100644
--- a/src/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/examples/CallbackJVppFacadeExample.java
+++ b/src/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/examples/CallbackJVppFacadeExample.java
@@ -20,8 +20,8 @@
 import io.fd.vpp.jvpp.JVppRegistryImpl;
 import io.fd.vpp.jvpp.VppCallbackException;
 import io.fd.vpp.jvpp.core.JVppCoreImpl;
-import io.fd.vpp.jvpp.core.callback.GetNodeIndexCallback;
-import io.fd.vpp.jvpp.core.callback.ShowVersionCallback;
+import io.fd.vpp.jvpp.core.callback.GetNodeIndexReplyCallback;
+import io.fd.vpp.jvpp.core.callback.ShowVersionReplyCallback;
 import io.fd.vpp.jvpp.core.callfacade.CallbackJVppCoreFacade;
 import io.fd.vpp.jvpp.core.dto.GetNodeIndex;
 import io.fd.vpp.jvpp.core.dto.GetNodeIndexReply;
@@ -34,7 +34,7 @@
  */
 public class CallbackJVppFacadeExample {
 
-    private static ShowVersionCallback showVersionCallback1 = new ShowVersionCallback() {
+    private static ShowVersionReplyCallback showVersionCallback1 = new ShowVersionReplyCallback() {
         @Override
         public void onShowVersionReply(final ShowVersionReply msg) {
             System.out.printf("ShowVersionCallback1 received ShowVersionReply: context=%d, program=%s,"
@@ -52,7 +52,7 @@
         }
     };
 
-    private static ShowVersionCallback showVersionCallback2 = new ShowVersionCallback() {
+    private static ShowVersionReplyCallback showVersionCallback2 = new ShowVersionReplyCallback() {
         @Override
         public void onShowVersionReply(final ShowVersionReply msg) {
             System.out.printf("ShowVersionCallback2 received ShowVersionReply: context=%d, program=%s,"
@@ -71,7 +71,7 @@
 
     };
 
-    private static GetNodeIndexCallback getNodeIndexCallback = new GetNodeIndexCallback() {
+    private static GetNodeIndexReplyCallback getNodeIndexCallback = new GetNodeIndexReplyCallback() {
         @Override
         public void onGetNodeIndexReply(final GetNodeIndexReply msg) {
             System.out.printf("Received GetNodeIndexReply: %s%n", msg);
diff --git a/src/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/examples/CallbackJVppFacadeNotificationExample.java b/src/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/examples/CallbackJVppFacadeNotificationExample.java
index 308dad9..832464a 100644
--- a/src/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/examples/CallbackJVppFacadeNotificationExample.java
+++ b/src/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/examples/CallbackJVppFacadeNotificationExample.java
@@ -21,9 +21,11 @@
 import io.fd.vpp.jvpp.VppCallbackException;
 import io.fd.vpp.jvpp.core.JVppCore;
 import io.fd.vpp.jvpp.core.JVppCoreImpl;
-import io.fd.vpp.jvpp.core.callback.WantInterfaceEventsCallback;
+import io.fd.vpp.jvpp.core.callback.WantInterfaceEventsReplyCallback;
+import io.fd.vpp.jvpp.core.callback.SwInterfaceEventCallback;
 import io.fd.vpp.jvpp.core.callfacade.CallbackJVppCoreFacade;
 import io.fd.vpp.jvpp.core.dto.WantInterfaceEventsReply;
+import io.fd.vpp.jvpp.core.dto.SwInterfaceEvent;
 
 public class CallbackJVppFacadeNotificationExample {
 
@@ -36,12 +38,20 @@
             System.out.println("Successfully connected to VPP");
 
             final AutoCloseable notificationListenerReg =
-                jvppCallbackFacade.getNotificationRegistry().registerSwInterfaceEventNotificationCallback(
-                    NotificationUtils::printNotification
-                );
+                jvppCallbackFacade.getEventRegistry().registerSwInterfaceEventCallback(
+                        new SwInterfaceEventCallback() {
+                            public void onSwInterfaceEvent(SwInterfaceEvent reply) {
+                                System.out.printf("Received interface notification: ifc: %s%n", reply);
+                            }
+
+                            public void onError (VppCallbackException ex) {
+                                System.out.printf("Received onError exception: call=%s, context=%d, retval=%d%n",
+                                        ex.getMethodName(), ex.getCtxId(), ex.getErrorCode());
+                            }
+                        });
 
             jvppCallbackFacade.wantInterfaceEvents(NotificationUtils.getEnableInterfaceNotificationsReq(),
-                new WantInterfaceEventsCallback() {
+                new WantInterfaceEventsReplyCallback() {
                     @Override
                     public void onWantInterfaceEventsReply(final WantInterfaceEventsReply reply) {
                         System.out.println("Interface events started");
@@ -60,7 +70,7 @@
             Thread.sleep(1000);
 
             jvppCallbackFacade.wantInterfaceEvents(NotificationUtils.getDisableInterfaceNotificationsReq(),
-                new WantInterfaceEventsCallback() {
+                new WantInterfaceEventsReplyCallback() {
                     @Override
                     public void onWantInterfaceEventsReply(final WantInterfaceEventsReply reply) {
                         System.out.println("Interface events stopped");
diff --git a/src/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/examples/CallbackNotificationApiExample.java b/src/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/examples/CallbackNotificationApiExample.java
index 7d56b7e..9ed418e 100644
--- a/src/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/examples/CallbackNotificationApiExample.java
+++ b/src/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/examples/CallbackNotificationApiExample.java
@@ -26,9 +26,9 @@
 import io.fd.vpp.jvpp.JVppRegistryImpl;
 import io.fd.vpp.jvpp.VppCallbackException;
 import io.fd.vpp.jvpp.core.JVppCoreImpl;
-import io.fd.vpp.jvpp.core.callback.SwInterfaceEventNotificationCallback;
-import io.fd.vpp.jvpp.core.callback.WantInterfaceEventsCallback;
-import io.fd.vpp.jvpp.core.dto.SwInterfaceEventNotification;
+import io.fd.vpp.jvpp.core.callback.SwInterfaceEventCallback;
+import io.fd.vpp.jvpp.core.callback.WantInterfaceEventsReplyCallback;
+import io.fd.vpp.jvpp.core.dto.SwInterfaceEvent;
 import io.fd.vpp.jvpp.core.dto.SwInterfaceSetFlagsReply;
 import io.fd.vpp.jvpp.core.dto.WantInterfaceEventsReply;
 
@@ -64,12 +64,12 @@
         testCallbackApi();
     }
 
-    private static class TestCallback implements SwInterfaceEventNotificationCallback,
-        WantInterfaceEventsCallback {
+    private static class TestCallback implements SwInterfaceEventCallback,
+            WantInterfaceEventsReplyCallback {
 
         @Override
-        public void onSwInterfaceEventNotification(
-            final SwInterfaceEventNotification msg) {
+        public void onSwInterfaceEvent(
+            final SwInterfaceEvent msg) {
             printNotification(msg);
         }
 
diff --git a/src/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/examples/FutureApiNotificationExample.java b/src/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/examples/FutureApiNotificationExample.java
index 7460401..3c84fd7 100644
--- a/src/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/examples/FutureApiNotificationExample.java
+++ b/src/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/examples/FutureApiNotificationExample.java
@@ -24,6 +24,9 @@
 import io.fd.vpp.jvpp.JVppRegistryImpl;
 import io.fd.vpp.jvpp.core.JVppCoreImpl;
 import io.fd.vpp.jvpp.core.future.FutureJVppCoreFacade;
+import io.fd.vpp.jvpp.core.callback.SwInterfaceEventCallback;
+import io.fd.vpp.jvpp.core.dto.SwInterfaceEvent;
+import io.fd.vpp.jvpp.VppCallbackException;
 
 public class FutureApiNotificationExample {
 
@@ -32,8 +35,17 @@
         try (final JVppRegistry registry = new JVppRegistryImpl("FutureApiNotificationExample");
              final FutureJVppCoreFacade jvppFacade = new FutureJVppCoreFacade(registry, new JVppCoreImpl());
              final AutoCloseable notificationListenerReg =
-                 jvppFacade.getNotificationRegistry()
-                     .registerSwInterfaceEventNotificationCallback(NotificationUtils::printNotification)) {
+                 jvppFacade.getEventRegistry()
+                     .registerSwInterfaceEventCallback(new SwInterfaceEventCallback() {
+                         public void onSwInterfaceEvent(SwInterfaceEvent reply) {
+                             System.out.printf("Received interface notification: ifc: %s%n", reply);
+                         }
+
+                         public void onError (VppCallbackException ex) {
+                             System.out.printf("Received onError exception: call=%s, context=%d, retval=%d%n",
+                                     ex.getMethodName(), ex.getCtxId(), ex.getErrorCode());
+                         }
+                     })) {
             System.out.println("Successfully connected to VPP");
             jvppFacade.wantInterfaceEvents(getEnableInterfaceNotificationsReq()).toCompletableFuture().get();
             System.out.println("Interface events started");
diff --git a/src/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/examples/NotificationUtils.java b/src/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/examples/NotificationUtils.java
index d3f9dd2..e963d63 100644
--- a/src/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/examples/NotificationUtils.java
+++ b/src/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/examples/NotificationUtils.java
@@ -18,14 +18,14 @@
 
 import java.io.PrintStream;
 import io.fd.vpp.jvpp.core.dto.SwInterfaceSetFlags;
-import io.fd.vpp.jvpp.core.dto.SwInterfaceEventNotification;
+import io.fd.vpp.jvpp.core.dto.SwInterfaceEvent;
 import io.fd.vpp.jvpp.core.dto.WantInterfaceEvents;
 
 final class NotificationUtils {
 
     private NotificationUtils() {}
 
-    static PrintStream printNotification(final SwInterfaceEventNotification msg) {
+    static PrintStream printNotification(final SwInterfaceEvent msg) {
         return System.out.printf("Received interface notification: ifc: %s%n", msg);
     }
 
diff --git a/src/vpp-api/java/jvpp-ioampot/io/fd/vpp/jvpp/ioampot/examples/IoamPotApiExample.java b/src/vpp-api/java/jvpp-ioampot/io/fd/vpp/jvpp/ioampot/examples/IoamPotApiExample.java
index e97d24f..b9ed7d0 100644
--- a/src/vpp-api/java/jvpp-ioampot/io/fd/vpp/jvpp/ioampot/examples/IoamPotApiExample.java
+++ b/src/vpp-api/java/jvpp-ioampot/io/fd/vpp/jvpp/ioampot/examples/IoamPotApiExample.java
@@ -21,14 +21,14 @@
 import io.fd.vpp.jvpp.JVppRegistryImpl;
 import io.fd.vpp.jvpp.VppCallbackException;
 import io.fd.vpp.jvpp.ioampot.JVppIoampotImpl;
-import io.fd.vpp.jvpp.ioampot.callback.PotProfileAddCallback;
+import io.fd.vpp.jvpp.ioampot.callback.PotProfileAddReplyCallback;
 import io.fd.vpp.jvpp.ioampot.dto.PotProfileAdd;
 import io.fd.vpp.jvpp.ioampot.dto.PotProfileAddReply;
 import java.nio.charset.StandardCharsets;
 
 public class IoamPotApiExample {
 
-    static class IoamPotTestCallback implements PotProfileAddCallback {
+    static class IoamPotTestCallback implements PotProfileAddReplyCallback {
 
         @Override
         public void onPotProfileAddReply(final PotProfileAddReply reply) {
diff --git a/src/vpp-api/java/jvpp-ioamtrace/io/fd/vpp/jvpp/ioamtrace/examples/IoamTraceApiExample.java b/src/vpp-api/java/jvpp-ioamtrace/io/fd/vpp/jvpp/ioamtrace/examples/IoamTraceApiExample.java
index 827466b..d63d137 100644
--- a/src/vpp-api/java/jvpp-ioamtrace/io/fd/vpp/jvpp/ioamtrace/examples/IoamTraceApiExample.java
+++ b/src/vpp-api/java/jvpp-ioamtrace/io/fd/vpp/jvpp/ioamtrace/examples/IoamTraceApiExample.java
@@ -22,7 +22,7 @@
 import io.fd.vpp.jvpp.VppCallbackException;
 import io.fd.vpp.jvpp.ioamtrace.future.FutureJVppIoamtraceFacade;
 import io.fd.vpp.jvpp.ioamtrace.JVppIoamtraceImpl;
-import io.fd.vpp.jvpp.ioamtrace.callback.TraceProfileAddCallback;
+import io.fd.vpp.jvpp.ioamtrace.callback.TraceProfileAddReplyCallback;
 import io.fd.vpp.jvpp.ioamtrace.dto.TraceProfileAdd;
 import io.fd.vpp.jvpp.ioamtrace.dto.TraceProfileAddReply;
 import io.fd.vpp.jvpp.ioamtrace.dto.TraceProfileShowConfig;
@@ -30,7 +30,7 @@
 
 public class IoamTraceApiExample {
 
-    static class IoamTraceTestCallback implements TraceProfileAddCallback {
+    static class IoamTraceTestCallback implements TraceProfileAddReplyCallback {
 
         @Override
         public void onTraceProfileAddReply(final TraceProfileAddReply reply) {
diff --git a/src/vpp-api/java/jvpp-nat/io/fd/vpp/jvpp/nat/examples/CallbackApiExample.java b/src/vpp-api/java/jvpp-nat/io/fd/vpp/jvpp/nat/examples/CallbackApiExample.java
index e4d5cb3..e0d93ff 100644
--- a/src/vpp-api/java/jvpp-nat/io/fd/vpp/jvpp/nat/examples/CallbackApiExample.java
+++ b/src/vpp-api/java/jvpp-nat/io/fd/vpp/jvpp/nat/examples/CallbackApiExample.java
@@ -21,13 +21,13 @@
 import io.fd.vpp.jvpp.JVppRegistryImpl;
 import io.fd.vpp.jvpp.VppCallbackException;
 import io.fd.vpp.jvpp.nat.JVppNatImpl;
-import io.fd.vpp.jvpp.nat.callback.Nat44InterfaceAddDelFeatureCallback;
+import io.fd.vpp.jvpp.nat.callback.Nat44InterfaceAddDelFeatureReplyCallback;
 import io.fd.vpp.jvpp.nat.dto.Nat44InterfaceAddDelFeature;
 import io.fd.vpp.jvpp.nat.dto.Nat44InterfaceAddDelFeatureReply;
 
 public class CallbackApiExample {
 
-    static class TestCallback implements Nat44InterfaceAddDelFeatureCallback {
+    static class TestCallback implements Nat44InterfaceAddDelFeatureReplyCallback {
 
         @Override
         public void onNat44InterfaceAddDelFeatureReply(final Nat44InterfaceAddDelFeatureReply msg) {
diff --git a/src/vpp-api/java/jvpp-registry/io/fd/vpp/jvpp/dto/JVppNotification.java b/src/vpp-api/java/jvpp-registry/io/fd/vpp/jvpp/dto/JVppNotification.java
deleted file mode 100644
index 5554f50..0000000
--- a/src/vpp-api/java/jvpp-registry/io/fd/vpp/jvpp/dto/JVppNotification.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Copyright (c) 2016 Cisco and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at:
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package io.fd.vpp.jvpp.dto;
-
-/**
-* Base interface for all notification DTOs
-*/
-public interface JVppNotification {
-}
diff --git a/src/vpp-api/java/jvpp-registry/io/fd/vpp/jvpp/future/FutureJVppInvoker.java b/src/vpp-api/java/jvpp-registry/io/fd/vpp/jvpp/future/FutureJVppInvoker.java
index 7a48e41..65250ed 100644
--- a/src/vpp-api/java/jvpp-registry/io/fd/vpp/jvpp/future/FutureJVppInvoker.java
+++ b/src/vpp-api/java/jvpp-registry/io/fd/vpp/jvpp/future/FutureJVppInvoker.java
@@ -22,12 +22,12 @@
 import io.fd.vpp.jvpp.dto.JVppRequest;
 
 import java.util.concurrent.CompletionStage;
-import io.fd.vpp.jvpp.notification.NotificationRegistryProvider;
+import io.fd.vpp.jvpp.notification.EventRegistryProvider;
 
 /**
 * Future facade on top of JVpp
 */
-public interface FutureJVppInvoker extends NotificationRegistryProvider, AutoCloseable {
+public interface FutureJVppInvoker extends EventRegistryProvider, AutoCloseable {
 
     /**
      * Invoke asynchronous operation on VPP
diff --git a/src/vpp-api/java/jvpp-registry/io/fd/vpp/jvpp/notification/NotificationRegistry.java b/src/vpp-api/java/jvpp-registry/io/fd/vpp/jvpp/notification/EventRegistry.java
similarity index 92%
rename from src/vpp-api/java/jvpp-registry/io/fd/vpp/jvpp/notification/NotificationRegistry.java
rename to src/vpp-api/java/jvpp-registry/io/fd/vpp/jvpp/notification/EventRegistry.java
index 3c72ff7..12515a5 100644
--- a/src/vpp-api/java/jvpp-registry/io/fd/vpp/jvpp/notification/NotificationRegistry.java
+++ b/src/vpp-api/java/jvpp-registry/io/fd/vpp/jvpp/notification/EventRegistry.java
@@ -19,7 +19,7 @@
 /**
  * Base registry for notification callbacks.
  */
-public interface NotificationRegistry extends AutoCloseable {
+public interface EventRegistry extends AutoCloseable {
 
     void close();
 }
diff --git a/src/vpp-api/java/jvpp-registry/io/fd/vpp/jvpp/notification/NotificationRegistryProvider.java b/src/vpp-api/java/jvpp-registry/io/fd/vpp/jvpp/notification/EventRegistryProvider.java
similarity index 88%
rename from src/vpp-api/java/jvpp-registry/io/fd/vpp/jvpp/notification/NotificationRegistryProvider.java
rename to src/vpp-api/java/jvpp-registry/io/fd/vpp/jvpp/notification/EventRegistryProvider.java
index 4a6e06b..1ac5d55 100644
--- a/src/vpp-api/java/jvpp-registry/io/fd/vpp/jvpp/notification/NotificationRegistryProvider.java
+++ b/src/vpp-api/java/jvpp-registry/io/fd/vpp/jvpp/notification/EventRegistryProvider.java
@@ -19,10 +19,10 @@
 /**
  * Provides notification registry
  */
-public interface NotificationRegistryProvider {
+public interface EventRegistryProvider {
 
     /**
      * Get current notification registry instance
      */
-    NotificationRegistry getNotificationRegistry();
+    EventRegistry getEventRegistry();
 }
diff --git a/src/vpp-api/java/jvpp/gen/jvppgen/callback_gen.py b/src/vpp-api/java/jvpp/gen/jvppgen/callback_gen.py
index b3024b9..f0aee47 100644
--- a/src/vpp-api/java/jvpp/gen/jvppgen/callback_gen.py
+++ b/src/vpp-api/java/jvpp/gen/jvppgen/callback_gen.py
@@ -68,16 +68,9 @@
         if not util.is_reply(camel_case_name_with_suffix) and not util.is_notification(func['name']):
             continue
 
-        if util.is_reply(camel_case_name_with_suffix):
-            camel_case_name = util.remove_reply_suffix(camel_case_name_with_suffix)
-            callback_type = "JVppCallback"
-        else:
-            camel_case_name_with_suffix = util.add_notification_suffix(camel_case_name_with_suffix)
-            camel_case_name = camel_case_name_with_suffix
-            callback_type = "JVppNotificationCallback"
-
-        callbacks.append("{0}.{1}.{2}".format(plugin_package, callback_package, camel_case_name + callback_suffix))
-        callback_path = os.path.join(callback_package, camel_case_name + callback_suffix + ".java")
+        callback_type = "JVppCallback"
+        callbacks.append("{0}.{1}.{2}".format(plugin_package, callback_package, camel_case_name_with_suffix + callback_suffix))
+        callback_path = os.path.join(callback_package, camel_case_name_with_suffix + callback_suffix + ".java")
         callback_file = open(callback_path, 'w')
 
         reply_type = "%s.%s.%s" % (plugin_package, dto_package, camel_case_name_with_suffix)
@@ -85,7 +78,7 @@
         callback_file.write(
             callback_template.substitute(inputfile=inputfile,
                                          docs=util.api_message_to_javadoc(func),
-                                         cls_name=camel_case_name + callback_suffix,
+                                         cls_name=camel_case_name_with_suffix + callback_suffix,
                                          callback_method=method,
                                          base_package=base_package,
                                          plugin_package=plugin_package,
diff --git a/src/vpp-api/java/jvpp/gen/jvppgen/dto_gen.py b/src/vpp-api/java/jvpp/gen/jvppgen/dto_gen.py
index e831557..e94bbc5 100644
--- a/src/vpp-api/java/jvpp/gen/jvppgen/dto_gen.py
+++ b/src/vpp-api/java/jvpp/gen/jvppgen/dto_gen.py
@@ -35,6 +35,23 @@
 }
 """)
 
+dto_template_typeless = Template("""
+package $plugin_package.$dto_package;
+
+/**
+ * <p>This class represents $description.
+ * <br>It was generated by dto_gen.py based on $inputfile preparsed data:
+ * <pre>
+$docs
+ * </pre>
+ */
+public final class $cls_name {
+
+$fields
+$methods
+}
+""")
+
 field_template = Template("""    public $type $name;\n""")
 
 send_template = Template("""    @Override
@@ -93,9 +110,7 @@
 
         # for structures that are also used as notifications, generate dedicated notification DTO
         if util.is_notification(func["name"]):
-            base_type = "JVppNotification"
             description = "notification DTO"
-            camel_case_dto_name = util.add_notification_suffix(camel_case_dto_name)
             dto_path = os.path.join(dto_package, camel_case_dto_name + ".java")
             methods = generate_dto_base_methods(camel_case_dto_name, func)
             write_dto_file(base_package, plugin_package, base_type, camel_case_dto_name, description, dto_package,
@@ -229,16 +244,26 @@
 def write_dto_file(base_package, plugin_package, base_type, camel_case_dto_name, description, dto_package, dto_path,
                    fields, func, inputfile, methods):
     dto_file = open(dto_path, 'w')
-    dto_file.write(dto_template.substitute(inputfile=inputfile,
-                                           description=description,
-                                           docs=util.api_message_to_javadoc(func),
-                                           cls_name=camel_case_dto_name,
-                                           fields=fields,
-                                           methods=methods,
-                                           base_package=base_package,
-                                           plugin_package=plugin_package,
-                                           base_type=base_type,
-                                           dto_package=dto_package))
+    if base_type != "":
+        dto_file.write(dto_template.substitute(inputfile=inputfile,
+                                               description=description,
+                                               docs=util.api_message_to_javadoc(func),
+                                               cls_name=camel_case_dto_name,
+                                               fields=fields,
+                                               methods=methods,
+                                               base_package=base_package,
+                                               plugin_package=plugin_package,
+                                               base_type=base_type,
+                                               dto_package=dto_package))
+    else:
+        dto_file.write(dto_template_typeless.substitute(inputfile=inputfile,
+                                                        description=description,
+                                                        docs=util.api_message_to_javadoc(func),
+                                                        cls_name=camel_case_dto_name,
+                                                        fields=fields,
+                                                        methods=methods,
+                                                        plugin_package=plugin_package,
+                                                        dto_package=dto_package))
     dto_file.flush()
     dto_file.close()
 
diff --git a/src/vpp-api/java/jvpp/gen/jvppgen/jvpp_c_gen.py b/src/vpp-api/java/jvpp/gen/jvppgen/jvpp_c_gen.py
index 4fe7ab5..e2f6aa4 100644
--- a/src/vpp-api/java/jvpp/gen/jvppgen/jvpp_c_gen.py
+++ b/src/vpp-api/java/jvpp/gen/jvppgen/jvpp_c_gen.py
@@ -70,23 +70,13 @@
         if util.is_ignored(c_name) or util.is_control_ping(class_name):
             continue
 
-        if util.is_reply(class_name):
-            class_references.append(class_reference_template.substitute(
-                ref_name=ref_name))
-            find_class_invocations.append(find_class_invocation_template.substitute(
-                plugin_name=plugin_name,
-                ref_name=ref_name,
-                class_name=class_name))
-            delete_class_invocations.append(delete_class_invocation_template.substitute(ref_name=ref_name))
-        elif util.is_notification(c_name):
-            class_references.append(class_reference_template.substitute(
-                ref_name=util.add_notification_suffix(ref_name)))
-            find_class_invocations.append(find_class_invocation_template.substitute(
-                plugin_name=plugin_name,
-                ref_name=util.add_notification_suffix(ref_name),
-                class_name=util.add_notification_suffix(class_name)))
-            delete_class_invocations.append(delete_class_invocation_template.substitute(
-                ref_name=util.add_notification_suffix(ref_name)))
+        class_references.append(class_reference_template.substitute(
+            ref_name=ref_name))
+        find_class_invocations.append(find_class_invocation_template.substitute(
+            plugin_name=plugin_name,
+            ref_name=ref_name,
+            class_name=class_name))
+        delete_class_invocations.append(delete_class_invocation_template.substitute(ref_name=ref_name))
 
     # add exception class to class cache
     ref_name = 'callbackException'
@@ -270,10 +260,6 @@
         if not util.is_reply(dto_name) and not util.is_notification(handler_name):
             continue
 
-        if util.is_notification(handler_name):
-            dto_name = util.add_notification_suffix(dto_name)
-            ref_name = util.add_notification_suffix(ref_name)
-
         dto_setters = ''
         err_handler = ''
         # dto setters
diff --git a/src/vpp-api/java/jvpp/gen/jvppgen/jvpp_callback_facade_gen.py b/src/vpp-api/java/jvpp/gen/jvppgen/jvpp_callback_facade_gen.py
index 3cfc633..53e9f49 100644
--- a/src/vpp-api/java/jvpp/gen/jvppgen/jvpp_callback_facade_gen.py
+++ b/src/vpp-api/java/jvpp/gen/jvppgen/jvpp_callback_facade_gen.py
@@ -27,7 +27,7 @@
  * <br>It was generated by jvpp_callback_facade_gen.py based on $inputfile
  * <br>(python representation of api file generated by vppapigen).
  */
-public interface CallbackJVpp${plugin_name} extends $base_package.$notification_package.NotificationRegistryProvider, java.lang.AutoCloseable {
+public interface CallbackJVpp${plugin_name} extends $base_package.$notification_package.EventRegistryProvider, java.lang.AutoCloseable {
 
     // TODO add send
 
@@ -47,7 +47,7 @@
 
     private final $plugin_package.JVpp${plugin_name} jvpp;
     private final java.util.Map<Integer, $base_package.$callback_package.JVppCallback> callbacks;
-    private final $plugin_package.$notification_package.${plugin_name}NotificationRegistryImpl notificationRegistry = new $plugin_package.$notification_package.${plugin_name}NotificationRegistryImpl();
+    private final $plugin_package.$notification_package.${plugin_name}EventRegistryImpl eventRegistry = new $plugin_package.$notification_package.${plugin_name}EventRegistryImpl();
     /**
      * <p>Create CallbackJVpp${plugin_name}Facade object for provided JVpp instance.
      * Constructor internally creates CallbackJVppFacadeCallback class for processing callbacks
@@ -61,12 +61,12 @@
         this.jvpp = java.util.Objects.requireNonNull(jvpp,"jvpp is null");
         this.callbacks = new java.util.HashMap<>();
         java.util.Objects.requireNonNull(registry, "JVppRegistry should not be null");
-        registry.register(jvpp, new CallbackJVpp${plugin_name}FacadeCallback(this.callbacks, notificationRegistry));
+        registry.register(jvpp, new CallbackJVpp${plugin_name}FacadeCallback(this.callbacks, eventRegistry));
     }
 
     @Override
-    public $plugin_package.$notification_package.${plugin_name}NotificationRegistry getNotificationRegistry() {
-        return notificationRegistry;
+    public $plugin_package.$notification_package.${plugin_name}EventRegistry getEventRegistry() {
+        return eventRegistry;
     }
 
     @Override
@@ -121,7 +121,12 @@
             continue
 
         # Strip suffix for dump calls
-        callback_type = get_request_name(camel_case_name_upper, func['name']) + callback_gen.callback_suffix
+        callback_type = get_request_name(camel_case_name_upper, func['name'])
+        if (util.is_dump(camel_case_name_upper)):
+            callback_type += "Details"
+        elif (not util.is_notification(camel_case_name_upper)):
+            callback_type += "Reply"
+        callback_type += callback_gen.callback_suffix
 
         if len(func['args']) == 0:
             methods.append(no_arg_method_template.substitute(name=camel_case_name,
@@ -193,13 +198,13 @@
 public final class CallbackJVpp${plugin_name}FacadeCallback implements $plugin_package.$callback_package.JVpp${plugin_name}GlobalCallback {
 
     private final java.util.Map<Integer, $base_package.$callback_package.JVppCallback> requests;
-    private final $plugin_package.$notification_package.Global${plugin_name}NotificationCallback notificationCallback;
+    private final $plugin_package.$notification_package.Global${plugin_name}EventCallback eventCallback;
     private static final java.util.logging.Logger LOG = java.util.logging.Logger.getLogger(CallbackJVpp${plugin_name}FacadeCallback.class.getName());
 
     public CallbackJVpp${plugin_name}FacadeCallback(final java.util.Map<Integer, $base_package.$callback_package.JVppCallback> requestMap,
-                                      final $plugin_package.$notification_package.Global${plugin_name}NotificationCallback notificationCallback) {
+                                      final $plugin_package.$notification_package.Global${plugin_name}EventCallback eventCallback) {
         this.requests = requestMap;
-        this.notificationCallback = notificationCallback;
+        this.eventCallback = eventCallback;
     }
 
     @Override
@@ -266,7 +271,7 @@
         if (LOG.isLoggable(java.util.logging.Level.FINE)) {
             LOG.fine(String.format("Received $callback_dto event message: %s", notification));
         }
-        notificationCallback.on$callback_dto(notification);
+        eventCallback.on$callback_dto(notification);
     }
 """)
 
@@ -281,19 +286,19 @@
             continue
 
         if util.is_reply(camel_case_name_with_suffix):
+            request_method = camel_case_name_with_suffix
             callbacks.append(jvpp_facade_callback_method_template.substitute(plugin_package=plugin_package,
                                                                              dto_package=dto_package,
                                                                              callback_package=callback_package,
-                                                                             callback=util.remove_reply_suffix(camel_case_name_with_suffix) + callback_gen.callback_suffix,
-                                                                             callback_dto=camel_case_name_with_suffix))
+                                                                             callback=camel_case_name_with_suffix + callback_gen.callback_suffix,
+                                                                             callback_dto=request_method))
 
         if util.is_notification(func["name"]):
-            with_notification_suffix = util.add_notification_suffix(camel_case_name_with_suffix)
             callbacks.append(jvpp_facade_callback_notification_method_template.substitute(plugin_package=plugin_package,
                                                                              dto_package=dto_package,
                                                                              callback_package=callback_package,
-                                                                             callback=with_notification_suffix + callback_gen.callback_suffix,
-                                                                             callback_dto=with_notification_suffix))
+                                                                             callback=camel_case_name_with_suffix + callback_gen.callback_suffix,
+                                                                             callback_dto=camel_case_name_with_suffix))
 
     jvpp_file = open(os.path.join(callback_facade_package, "CallbackJVpp%sFacadeCallback.java" % plugin_name), 'w')
     jvpp_file.write(jvpp_facade_callback_template.substitute(inputfile=inputfile,
diff --git a/src/vpp-api/java/jvpp/gen/jvppgen/jvpp_future_facade_gen.py b/src/vpp-api/java/jvpp/gen/jvppgen/jvpp_future_facade_gen.py
index b2f8d37..a31287b 100644
--- a/src/vpp-api/java/jvpp/gen/jvppgen/jvpp_future_facade_gen.py
+++ b/src/vpp-api/java/jvpp/gen/jvppgen/jvpp_future_facade_gen.py
@@ -30,12 +30,12 @@
 public final class FutureJVpp${plugin_name}FacadeCallback implements $plugin_package.$callback_package.JVpp${plugin_name}GlobalCallback {
 
     private final java.util.Map<java.lang.Integer, java.util.concurrent.CompletableFuture<? extends $base_package.$dto_package.JVppReply<?>>> requests;
-    private final $plugin_package.$notification_package.Global${plugin_name}NotificationCallback notificationCallback;
+    private final $plugin_package.$notification_package.Global${plugin_name}EventCallback notificationCallback;
     private static final java.util.logging.Logger LOG = java.util.logging.Logger.getLogger(FutureJVpp${plugin_name}FacadeCallback.class.getName());
 
     public FutureJVpp${plugin_name}FacadeCallback(
         final java.util.Map<java.lang.Integer, java.util.concurrent.CompletableFuture<? extends $base_package.$dto_package.JVppReply<?>>> requestMap,
-        final $plugin_package.$notification_package.Global${plugin_name}NotificationCallback notificationCallback) {
+        final $plugin_package.$notification_package.Global${plugin_name}EventCallback notificationCallback) {
         this.requests = requestMap;
         this.notificationCallback = notificationCallback;
     }
@@ -213,7 +213,7 @@
         if util.is_notification(func["name"]):
             callbacks.append(jvpp_facade_callback_notification_method_template.substitute(plugin_package=plugin_package,
                                                                                           dto_package=dto_package,
-                                                                                          callback_dto=util.add_notification_suffix(camel_case_name_with_suffix)))
+                                                                                          callback_dto=camel_case_name_with_suffix))
 
     jvpp_file = open(os.path.join(future_facade_package, "FutureJVpp%sFacadeCallback.java" % plugin_name), 'w')
     jvpp_file.write(jvpp_facade_callback_template.substitute(inputfile=inputfile,
@@ -264,7 +264,7 @@
 $methods
 
     @Override
-    public $plugin_package.$notification_package.${plugin_name}NotificationRegistry getNotificationRegistry();
+    public $plugin_package.$notification_package.${plugin_name}EventRegistry getEventRegistry();
 
 }
 ''')
@@ -284,7 +284,7 @@
  */
 public class FutureJVpp${plugin_name}Facade extends $base_package.$future_package.AbstractFutureJVppInvoker implements FutureJVpp${plugin_name} {
 
-    private final $plugin_package.$notification_package.${plugin_name}NotificationRegistryImpl notificationRegistry = new $plugin_package.$notification_package.${plugin_name}NotificationRegistryImpl();
+    private final $plugin_package.$notification_package.${plugin_name}EventRegistryImpl eventRegistry = new $plugin_package.$notification_package.${plugin_name}EventRegistryImpl();
 
     /**
      * <p>Create FutureJVpp${plugin_name}Facade object for provided JVpp instance.
@@ -298,12 +298,12 @@
     public FutureJVpp${plugin_name}Facade(final $base_package.JVppRegistry registry, final $base_package.JVpp jvpp) throws java.io.IOException {
         super(jvpp, registry, new java.util.HashMap<>());
         java.util.Objects.requireNonNull(registry, "JVppRegistry should not be null");
-        registry.register(jvpp, new FutureJVpp${plugin_name}FacadeCallback(getRequests(), notificationRegistry));
+        registry.register(jvpp, new FutureJVpp${plugin_name}FacadeCallback(getRequests(), eventRegistry));
     }
 
     @Override
-    public $plugin_package.$notification_package.${plugin_name}NotificationRegistry getNotificationRegistry() {
-        return notificationRegistry;
+    public $plugin_package.$notification_package.${plugin_name}EventRegistry getEventRegistry() {
+        return eventRegistry;
     }
 
 $methods
diff --git a/src/vpp-api/java/jvpp/gen/jvppgen/jvpp_impl_gen.py b/src/vpp-api/java/jvpp/gen/jvppgen/jvpp_impl_gen.py
index 7af70be..f802ee2 100644
--- a/src/vpp-api/java/jvpp/gen/jvppgen/jvpp_impl_gen.py
+++ b/src/vpp-api/java/jvpp/gen/jvppgen/jvpp_impl_gen.py
@@ -175,7 +175,7 @@
     for func in func_list:
 
         # Skip structures that are used only as notifications
-        if util.is_just_notification(func['name']) or util.is_ignored(func['name']):
+        if util.is_ignored(func['name']):
             continue
 
         camel_case_name = util.underscore_to_camelcase(func['name'])
diff --git a/src/vpp-api/java/jvpp/gen/jvppgen/notification_gen.py b/src/vpp-api/java/jvpp/gen/jvppgen/notification_gen.py
index 66de7a5..9611119 100644
--- a/src/vpp-api/java/jvpp/gen/jvppgen/notification_gen.py
+++ b/src/vpp-api/java/jvpp/gen/jvppgen/notification_gen.py
@@ -27,7 +27,7 @@
  * <br>It was generated by notification_gen.py based on $inputfile
  * <br>(python representation of api file generated by vppapigen).
  */
-public interface ${plugin_name}NotificationRegistry extends $base_package.$notification_package.NotificationRegistry {
+public interface ${plugin_name}EventRegistry extends $base_package.$notification_package.EventRegistry {
 
     $register_callback_methods
 
@@ -44,7 +44,7 @@
  * <br>It was generated by notification_gen.py based on $inputfile
  * <br>(python representation of api file generated by vppapigen).
  */
-public interface Global${plugin_name}NotificationCallback$callbacks {
+public interface Global${plugin_name}EventCallback$callbacks {
 
 }
 """)
@@ -57,12 +57,12 @@
  * <br>It was generated by notification_gen.py based on $inputfile
  * <br>(python representation of api file generated by vppapigen).
  */
-public final class ${plugin_name}NotificationRegistryImpl implements ${plugin_name}NotificationRegistry, Global${plugin_name}NotificationCallback {
+public final class ${plugin_name}EventRegistryImpl implements ${plugin_name}EventRegistry, Global${plugin_name}EventCallback {
 
     // TODO add a special NotificationCallback interface and only allow those to be registered
-    private final java.util.concurrent.ConcurrentMap<Class<? extends $base_package.$dto_package.JVppNotification>, $base_package.$callback_package.JVppNotificationCallback> registeredCallbacks =
+    private final java.util.concurrent.ConcurrentMap<Class<?>, $base_package.$callback_package.JVppCallback> registeredCallbacks =
         new java.util.concurrent.ConcurrentHashMap<>();
-    private static java.util.logging.Logger LOG = java.util.logging.Logger.getLogger(${plugin_name}NotificationRegistryImpl.class.getName());
+    private static java.util.logging.Logger LOG = java.util.logging.Logger.getLogger(${plugin_name}EventRegistryImpl.class.getName());
 
     $register_callback_methods
     $handler_methods
@@ -71,6 +71,13 @@
     public void close() {
         registeredCallbacks.clear();
     }
+
+    @Override
+    public void onError(io.fd.vpp.jvpp.VppCallbackException ex) {
+        java.util.logging.Logger LOG = java.util.logging.Logger.getLogger(${plugin_name}EventRegistryImpl.class.getName());
+        LOG.log(java.util.logging.Level.WARNING, String.format("Received onError exception: call=%s, context=%d, retval=%d%n", ex.getMethodName(),
+            ex.getCtxId(), ex.getErrorCode()), ex);
+    }
 }
 """)
 
@@ -87,12 +94,12 @@
 handler_impl_template = Template("""
     @Override
     public void on$notification(
-        final $plugin_package.$dto_package.$notification notification) {
+        final $plugin_package.$dto_package.$notification_reply notification) {
         if (LOG.isLoggable(java.util.logging.Level.FINE)) {
             LOG.fine(String.format("Received $notification event message: %s", notification));
         }
-        final $base_package.$callback_package.JVppNotificationCallback jVppNotificationCallback = registeredCallbacks.get($plugin_package.$dto_package.$notification.class);
-        if (null != jVppNotificationCallback) {
+        final $base_package.$callback_package.JVppCallback jVppCallback = registeredCallbacks.get($plugin_package.$dto_package.$notification.class);
+        if (null != jVppCallback) {
             (($plugin_package.$callback_package.$callback) registeredCallbacks
                 .get($plugin_package.$dto_package.$notification.class))
                 .on$notification(notification);
@@ -104,14 +111,14 @@
 package $plugin_package.$notification_package;
 
  /**
- * Provides ${plugin_name}NotificationRegistry.
+ * Provides ${plugin_name}EventRegistry.
  * <br>The file was generated by notification_gen.py based on $inputfile
  * <br>(python representation of api file generated by vppapigen).
  */
-public interface ${plugin_name}NotificationRegistryProvider extends $base_package.$notification_package.NotificationRegistryProvider {
+public interface ${plugin_name}EventRegistryProvider extends $base_package.$notification_package.EventRegistryProvider {
 
     @Override
-    public ${plugin_name}NotificationRegistry getNotificationRegistry();
+    public ${plugin_name}EventRegistry getEventRegistry();
 }
 """)
 
@@ -129,12 +136,14 @@
     handler_methods = []
     for func in func_list:
 
-        if not util.is_notification(func['name']):
+        if not util.is_reply(func['name']) and not util.is_notification(func['name']):
             continue
 
         camel_case_name_with_suffix = util.underscore_to_camelcase_upper(func['name'])
-        notification_dto = util.add_notification_suffix(camel_case_name_with_suffix)
-        callback_ifc = notification_dto + callback_gen.callback_suffix
+        if util.is_control_ping(camel_case_name_with_suffix):
+            continue
+        notification_dto = camel_case_name_with_suffix
+        callback_ifc = camel_case_name_with_suffix + callback_gen.callback_suffix
         fully_qualified_callback_ifc = "{0}.{1}.{2}".format(plugin_package, callback_package, callback_ifc)
         callbacks.append(fully_qualified_callback_ifc)
 
@@ -145,17 +154,18 @@
         register_callback_methods_impl.append(register_callback_impl_template.substitute(plugin_package=plugin_package,
                                                                                          callback_package=callback_package,
                                                                                          dto_package=dto_package,
-                                                                                         notification=notification_dto,
+                                                                                         notification=camel_case_name_with_suffix,
                                                                                          callback=callback_ifc))
         handler_methods.append(handler_impl_template.substitute(base_package=base_package,
                                                                 plugin_package=plugin_package,
                                                                 callback_package=callback_package,
                                                                 dto_package=dto_package,
                                                                 notification=notification_dto,
+                                                                notification_reply=camel_case_name_with_suffix,
                                                                 callback=callback_ifc))
 
 
-    callback_file = open(os.path.join(notification_package, "%sNotificationRegistry.java" % plugin_name), 'w')
+    callback_file = open(os.path.join(notification_package, "%sEventRegistry.java" % plugin_name), 'w')
     callback_file.write(notification_registry_template.substitute(inputfile=inputfile,
                                                                 register_callback_methods="\n    ".join(register_callback_methods),
                                                                 base_package=base_package,
@@ -165,7 +175,7 @@
     callback_file.flush()
     callback_file.close()
 
-    callback_file = open(os.path.join(notification_package, "Global%sNotificationCallback.java" % plugin_name), 'w')
+    callback_file = open(os.path.join(notification_package, "Global%sEventCallback.java" % plugin_name), 'w')
 
     global_notification_callback_callbacks = ""
     if (callbacks):
@@ -179,7 +189,7 @@
     callback_file.flush()
     callback_file.close()
 
-    callback_file = open(os.path.join(notification_package, "%sNotificationRegistryImpl.java" % plugin_name), 'w')
+    callback_file = open(os.path.join(notification_package, "%sEventRegistryImpl.java" % plugin_name), 'w')
     callback_file.write(notification_registry_impl_template.substitute(inputfile=inputfile,
                                                                      callback_package=callback_package,
                                                                      dto_package=dto_package,
@@ -192,7 +202,7 @@
     callback_file.flush()
     callback_file.close()
 
-    callback_file = open(os.path.join(notification_package, "%sNotificationRegistryProvider.java" % plugin_name), 'w')
+    callback_file = open(os.path.join(notification_package, "%sEventRegistryProvider.java" % plugin_name), 'w')
     callback_file.write(notification_provider_template.substitute(inputfile=inputfile,
                                                                      base_package=base_package,
                                                                      plugin_package=plugin_package,
diff --git a/src/vpp-api/java/jvpp/gen/jvppgen/util.py b/src/vpp-api/java/jvpp/gen/jvppgen/util.py
index 4239441..4864524 100644
--- a/src/vpp-api/java/jvpp/gen/jvppgen/util.py
+++ b/src/vpp-api/java/jvpp/gen/jvppgen/util.py
@@ -41,6 +41,7 @@
 def is_reply(name):
     return name.lower().endswith(reply_suffixes)
 
+details_suffix = "details"
 
 def is_details(name):
     return name.lower().endswith(reply_suffixes[1]) or name.lower().endswith(reply_suffixes[2])
@@ -186,6 +187,8 @@
 
 
 def remove_suffix(camel_case_name_with_suffix, suffix):
+    if not suffix:
+        return camel_case_name_with_suffix
     suffix_length = len(suffix)
     return camel_case_name_with_suffix[:-suffix_length] if suffix_length != 0 else camel_case_name_with_suffix
 
@@ -210,3 +213,6 @@
 
 def is_array(java_type_as_string):
     return java_type_as_string.endswith("[]")
+
+def is_want(name):
+    return name.startswith("want_")
\ No newline at end of file
