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
