diff options
author | 2016-05-13 10:17:51 +0200 | |
---|---|---|
committer | 2016-05-23 06:25:05 +0000 | |
commit | 071d610dc446f2914c0ca4c709be38719baa041c (patch) | |
tree | e97337183e4078ab00557665a02b9e3f0ee57071 /vpp-api/java/jvpp/org/openvpp/jvpp/test/FutureApiTest.java | |
parent | 6931f59e54c9643196c0edda20840e49e9eb1da1 (diff) |
Changed JVPP interface for construction and connectivity
Simplified construction, autoconnected; possible connect/close
See updated sample test cases with changed interface usage
Change-Id: Ib53e855880bc414868aa2b9bb8f5df086917e375
Signed-off-by: Tibor Sirovatka <tsirovat@cisco.com>
Diffstat (limited to 'vpp-api/java/jvpp/org/openvpp/jvpp/test/FutureApiTest.java')
-rw-r--r-- | vpp-api/java/jvpp/org/openvpp/jvpp/test/FutureApiTest.java | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/vpp-api/java/jvpp/org/openvpp/jvpp/test/FutureApiTest.java b/vpp-api/java/jvpp/org/openvpp/jvpp/test/FutureApiTest.java index fc84c9519d1..745482d1667 100644 --- a/vpp-api/java/jvpp/org/openvpp/jvpp/test/FutureApiTest.java +++ b/vpp-api/java/jvpp/org/openvpp/jvpp/test/FutureApiTest.java @@ -16,22 +16,17 @@ package org.openvpp.jvpp.test; -import java.util.HashMap; -import java.util.Map; import java.util.Objects; -import java.util.concurrent.CompletableFuture; import java.util.concurrent.Future; import org.openvpp.jvpp.VppJNIConnection; import org.openvpp.jvpp.dto.GetNodeIndex; import org.openvpp.jvpp.dto.GetNodeIndexReply; -import org.openvpp.jvpp.dto.JVppReply; import org.openvpp.jvpp.dto.ShowVersion; import org.openvpp.jvpp.dto.ShowVersionReply; import org.openvpp.jvpp.dto.SwInterfaceDetails; import org.openvpp.jvpp.dto.SwInterfaceDetailsReplyDump; import org.openvpp.jvpp.dto.SwInterfaceDump; import org.openvpp.jvpp.future.FutureJVppFacade; -import org.openvpp.jvpp.future.FutureJVppFacadeCallback; public class FutureApiTest { @@ -104,10 +99,9 @@ public class FutureApiTest { private static void testFutureApi() throws Exception { System.out.println("Testing Java future API"); - final Map<Integer, CompletableFuture<? extends JVppReply<?>>> map = new HashMap<>(); final org.openvpp.jvpp.JVppImpl impl = - new org.openvpp.jvpp.JVppImpl(VppJNIConnection.create("FutureApiTest", new FutureJVppFacadeCallback(map))); - final FutureJVppFacade jvppFacade = new FutureJVppFacade(impl, map); + new org.openvpp.jvpp.JVppImpl(new VppJNIConnection("FutureApiTest")); + final FutureJVppFacade jvppFacade = new FutureJVppFacade(impl); System.out.println("Successfully connected to VPP"); testShowVersion(jvppFacade); |