aboutsummaryrefslogtreecommitdiffstats
path: root/src/vpp-api/java/jvpp-registry
diff options
context:
space:
mode:
authorMatej Perina <mperina@cisco.com>2017-09-11 10:11:51 +0200
committerDamjan Marion <dmarion.lists@gmail.com>2017-10-10 16:44:03 +0000
commitac1a7286500c18ac51beb66e4a2b99ea26c8c966 (patch)
tree62a4a0430bd0d5623c5e9945ca5bf671745351f9 /src/vpp-api/java/jvpp-registry
parentd91c1dbdb31f80db7d967f2f57c43d0a81d65297 (diff)
jvpp: adding callbacks for all messages (VPP-914)
1) In the previous version callbacks were generated based on request-replay naming conventions. It turned out they were too strict in case of events (e.g. BFD sends Details messages as notifications). So now we generate callback for all messages, allowing to receive any message as notification.(callback_gen.py) 2) "notification" suffix is no longer added because all messages are treated same (dto_gen.py, jvpp_c_gen_.py) 3) name of property that holds notification/events changed in callback facade and future apis 4) JVppNotification.java is no longer used since all events are treated equally Change-Id: I13f6438affc3473040d63cd4acb3984d03e97482 Signed-off-by: Matej <matej.perina@pantheon.tech>
Diffstat (limited to 'src/vpp-api/java/jvpp-registry')
-rw-r--r--src/vpp-api/java/jvpp-registry/io/fd/vpp/jvpp/dto/JVppNotification.java23
-rw-r--r--src/vpp-api/java/jvpp-registry/io/fd/vpp/jvpp/future/FutureJVppInvoker.java4
-rw-r--r--src/vpp-api/java/jvpp-registry/io/fd/vpp/jvpp/notification/EventRegistry.java (renamed from src/vpp-api/java/jvpp-registry/io/fd/vpp/jvpp/notification/NotificationRegistry.java)2
-rw-r--r--src/vpp-api/java/jvpp-registry/io/fd/vpp/jvpp/notification/EventRegistryProvider.java (renamed from src/vpp-api/java/jvpp-registry/io/fd/vpp/jvpp/notification/NotificationRegistryProvider.java)4
4 files changed, 5 insertions, 28 deletions
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 5554f50165a..00000000000
--- 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 7a48e4181fa..65250ed5a8f 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.JVppReplyDump;
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
index 3c72ff793a4..12515a519e7 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 @@ package io.fd.vpp.jvpp.notification;
/**
* 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
index 4a6e06b705c..1ac5d55335b 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 @@ package io.fd.vpp.jvpp.notification;
/**
* Provides notification registry
*/
-public interface NotificationRegistryProvider {
+public interface EventRegistryProvider {
/**
* Get current notification registry instance
*/
- NotificationRegistry getNotificationRegistry();
+ EventRegistry getEventRegistry();
}