diff --git a/vpp-japi/japi/org/openvpp/vppjapi/vppApiCallbacks.java b/vpp-japi/japi/org/openvpp/vppjapi/vppApiCallbacks.java
index 5c35897..df5b953 100644
--- a/vpp-japi/japi/org/openvpp/vppjapi/vppApiCallbacks.java
+++ b/vpp-japi/japi/org/openvpp/vppjapi/vppApiCallbacks.java
@@ -14,9 +14,14 @@
  */
 
 package org.openvpp.vppjapi;
+
+import java.io.IOException;
 import org.openvpp.vppjapi.vppApi;
 
 public abstract class vppApiCallbacks extends vppApi {
+     public vppApiCallbacks(String clientName) throws IOException {
+         super(clientName);
+     }
 /* Disabled!
  *
  * public abstract void interfaceDetails(
diff --git a/vpp-japi/japi/org/openvpp/vppjapi/vppBridgeDomainDetails.java b/vpp-japi/japi/org/openvpp/vppjapi/vppBridgeDomainDetails.java
index 01fe11d..db859a0 100644
--- a/vpp-japi/japi/org/openvpp/vppjapi/vppBridgeDomainDetails.java
+++ b/vpp-japi/japi/org/openvpp/vppjapi/vppBridgeDomainDetails.java
@@ -17,7 +17,7 @@
 
 import org.openvpp.vppjapi.vppBridgeDomainInterfaceDetails;
 
-public class vppBridgeDomainDetails {
+public final class vppBridgeDomainDetails {
     public String name;
     public int bdId;
     public boolean flood;
diff --git a/vpp-japi/japi/org/openvpp/vppjapi/vppBridgeDomainInterfaceDetails.java b/vpp-japi/japi/org/openvpp/vppjapi/vppBridgeDomainInterfaceDetails.java
index f17c062..ab99ee4 100644
--- a/vpp-japi/japi/org/openvpp/vppjapi/vppBridgeDomainInterfaceDetails.java
+++ b/vpp-japi/japi/org/openvpp/vppjapi/vppBridgeDomainInterfaceDetails.java
@@ -15,7 +15,7 @@
 
 package org.openvpp.vppjapi;
 
-public class vppBridgeDomainInterfaceDetails {
+public final class vppBridgeDomainInterfaceDetails {
     public String interfaceName;
     public byte splitHorizonGroup;
 }
diff --git a/vpp-japi/japi/org/openvpp/vppjapi/vppConn.java b/vpp-japi/japi/org/openvpp/vppjapi/vppConn.java
index cd95780..8de806d 100644
--- a/vpp-japi/japi/org/openvpp/vppjapi/vppConn.java
+++ b/vpp-japi/japi/org/openvpp/vppjapi/vppConn.java
@@ -23,6 +23,7 @@
 import java.nio.file.attribute.PosixFilePermission;
 import java.nio.file.attribute.PosixFilePermissions;
 import java.util.Set;
+import java.util.concurrent.atomic.AtomicBoolean;
 
 import org.openvpp.vppjapi.vppVersion;
 import org.openvpp.vppjapi.vppInterfaceDetails;
@@ -32,7 +33,7 @@
 import org.openvpp.vppjapi.vppIPv6Address;
 import org.openvpp.vppjapi.vppVxlanTunnelDetails;
 
-public class vppConn {
+public class vppConn implements AutoCloseable {
     private static final String LIBNAME = "libvppjni.so.0.0.0";
 
     static {
@@ -40,6 +41,7 @@
             loadLibrary();
         } catch (IOException | RuntimeException e) {
             System.out.printf ("Can't find vpp jni library: %s\n", LIBNAME);
+            throw new ExceptionInInitializerError(e);
         }
     }
 
@@ -72,25 +74,163 @@
         }
     }
 
-    public native int clientConnect(String clientName);
-    public native void clientDisconnect();
-    public native int getRetval(int context, int release);
-    public native String getInterfaceList (String nameFilter);
-    public native int swIfIndexFromName (String interfaceName);
-    public native String interfaceNameFromSwIfIndex (int swIfIndex);
-    public native void clearInterfaceTable ();
-    public native vppInterfaceDetails[] swInterfaceDump (byte nameFilterValid, byte [] nameFilter);
-    public native int bridgeDomainIdFromName(String bridgeDomain);
-    public native int findOrAddBridgeDomainId(String bridgeDomain);
-    public native vppVersion getVppVersion();
-    public native vppInterfaceCounters getInterfaceCounters(int swIfIndex);
-    public native int[] bridgeDomainDump(int bdId);
-    public native vppBridgeDomainDetails getBridgeDomainDetails(int bdId);
-    public native vppL2Fib[] l2FibTableDump(int bdId);
-    public native int bridgeDomainIdFromInterfaceName(String interfaceName);
-    public native vppIPv4Address[] ipv4AddressDump(String interfaceName);
-    public native vppIPv6Address[] ipv6AddressDump(String interfaceName);
-    public native vppVxlanTunnelDetails[] vxlanTunnelDump(int swIfIndex);
-    public native int setInterfaceDescription (String ifName, String ifDesc);
-    public native String getInterfaceDescription (String ifName);
+    private static vppConn currentConnection = null;
+    private final AtomicBoolean disconnected = new AtomicBoolean(false);
+    private final String clientName;
+
+    // Hidden on purpose to prevent external instantiation
+    vppConn(final String clientName) throws IOException {
+        this.clientName = clientName;
+
+        synchronized (vppConn.class) {
+            if (currentConnection != null) {
+                throw new IOException("Already connected as " + currentConnection.clientName);
+            }
+
+            final int ret = clientConnect(clientName);
+            if (ret != 0) {
+                throw new IOException("Connection returned error " + ret);
+            }
+
+            currentConnection = this;
+        }
+    }
+
+    @Override
+    public final void close() {
+        if (disconnected.compareAndSet(false, true)) {
+            synchronized (vppConn.class) {
+                clientDisconnect();
+                currentConnection = null;
+            }
+        }
+    }
+
+    /**
+     * Check if this instance is connected.
+     *
+     * @throws IllegalStateException if this instance was disconnected.
+     */
+    protected final void checkConnected() {
+        if (disconnected.get()) {
+            throw new IllegalStateException("Disconnected client " + clientName);
+        }
+    }
+
+    public final int getRetval(int context, int release) {
+        checkConnected();
+        return getRetval0(context, release);
+    }
+
+    public final String getInterfaceList (String nameFilter) {
+        checkConnected();
+        return getInterfaceList0(nameFilter);
+    }
+
+    public final int swIfIndexFromName (String interfaceName) {
+        checkConnected();
+        return swIfIndexFromName0(interfaceName);
+    }
+
+    public final String interfaceNameFromSwIfIndex (int swIfIndex) {
+        checkConnected();
+        return interfaceNameFromSwIfIndex0(swIfIndex);
+    }
+
+    public final void clearInterfaceTable () {
+        checkConnected();
+        clearInterfaceTable0();
+    }
+
+    public final vppInterfaceDetails[] swInterfaceDump (byte nameFilterValid, byte [] nameFilter) {
+        checkConnected();
+        return swInterfaceDump0(nameFilterValid, nameFilter);
+    }
+
+    public final int bridgeDomainIdFromName(String bridgeDomain) {
+        checkConnected();
+        return bridgeDomainIdFromName0(bridgeDomain);
+    }
+
+    public final int findOrAddBridgeDomainId(String bridgeDomain) {
+        checkConnected();
+        return findOrAddBridgeDomainId0(bridgeDomain);
+    }
+
+    public final vppVersion getVppVersion() {
+        checkConnected();
+        return getVppVersion0();
+    }
+
+    public final vppInterfaceCounters getInterfaceCounters(int swIfIndex) {
+        checkConnected();
+        return getInterfaceCounters0(swIfIndex);
+    }
+
+    public final int[] bridgeDomainDump(int bdId) {
+        checkConnected();
+        return bridgeDomainDump0(bdId);
+    }
+
+    public final vppBridgeDomainDetails getBridgeDomainDetails(int bdId) {
+        checkConnected();
+        return getBridgeDomainDetails0(bdId);
+    }
+
+    public final vppL2Fib[] l2FibTableDump(int bdId) {
+        checkConnected();
+        return l2FibTableDump0(bdId);
+    }
+
+    public final int bridgeDomainIdFromInterfaceName(String interfaceName) {
+        checkConnected();
+        return bridgeDomainIdFromInterfaceName0(interfaceName);
+    }
+
+    public final vppIPv4Address[] ipv4AddressDump(String interfaceName) {
+        checkConnected();
+        return ipv4AddressDump0(interfaceName);
+    }
+
+    public final vppIPv6Address[] ipv6AddressDump(String interfaceName) {
+        checkConnected();
+        return ipv6AddressDump0(interfaceName);
+    }
+
+    public final vppVxlanTunnelDetails[] vxlanTunnelDump(int swIfIndex) {
+        checkConnected();
+        return vxlanTunnelDump0(swIfIndex);
+    }
+
+    public final int setInterfaceDescription(String ifName, String ifDesc) {
+        checkConnected();
+        return setInterfaceDescription0(ifName, ifDesc);
+    }
+
+    public final String getInterfaceDescription(String ifName) {
+        checkConnected();
+        return getInterfaceDescription0(ifName);
+    }
+
+    private static native int clientConnect(String clientName);
+    private static native void clientDisconnect();
+    private static native int getRetval0(int context, int release);
+    private static native String getInterfaceList0(String nameFilter);
+    private static native int swIfIndexFromName0(String interfaceName);
+    private static native String interfaceNameFromSwIfIndex0(int swIfIndex);
+    private static native void clearInterfaceTable0();
+    private static native vppInterfaceDetails[] swInterfaceDump0(byte nameFilterValid, byte [] nameFilter);
+    private static native int bridgeDomainIdFromName0(String bridgeDomain);
+    private static native int findOrAddBridgeDomainId0(String bridgeDomain);
+    private static native vppVersion getVppVersion0();
+    private static native vppInterfaceCounters getInterfaceCounters0(int swIfIndex);
+    private static native int[] bridgeDomainDump0(int bdId);
+    private static native vppBridgeDomainDetails getBridgeDomainDetails0(int bdId);
+    private static native vppL2Fib[] l2FibTableDump0(int bdId);
+    private static native int bridgeDomainIdFromInterfaceName0(String interfaceName);
+    private static native vppIPv4Address[] ipv4AddressDump0(String interfaceName);
+    private static native vppIPv6Address[] ipv6AddressDump0(String interfaceName);
+    private static native vppVxlanTunnelDetails[] vxlanTunnelDump0(int swIfIndex);
+    private static native int setInterfaceDescription0(String ifName, String ifDesc);
+    private static native String getInterfaceDescription0(String ifName);
 }
diff --git a/vpp-japi/japi/org/openvpp/vppjapi/vppIPv6Address.java b/vpp-japi/japi/org/openvpp/vppjapi/vppIPv6Address.java
index 7bf10f2..6690a5d 100644
--- a/vpp-japi/japi/org/openvpp/vppjapi/vppIPv6Address.java
+++ b/vpp-japi/japi/org/openvpp/vppjapi/vppIPv6Address.java
@@ -20,8 +20,8 @@
     public final byte[] ip;
     public final byte prefixLength;
 
-    public vppIPv6Address(byte[] _ip, byte _prefixLength) {
-        ip = _ip;
-        prefixLength = _prefixLength;
+    public vppIPv6Address(byte[] ip, byte prefixLength) {
+        this.ip = ip;
+        this.prefixLength = prefixLength;
     }
 }
diff --git a/vpp-japi/japi/org/openvpp/vppjapi/vppInterfaceCounters.java b/vpp-japi/japi/org/openvpp/vppjapi/vppInterfaceCounters.java
index 8a02ad0..b2687fb 100644
--- a/vpp-japi/japi/org/openvpp/vppjapi/vppInterfaceCounters.java
+++ b/vpp-japi/japi/org/openvpp/vppjapi/vppInterfaceCounters.java
@@ -15,7 +15,7 @@
 
 package org.openvpp.vppjapi;
 
-public class vppInterfaceCounters {
+public final class vppInterfaceCounters {
 
     public final long rxOctets;
     public final long rxIp4;
diff --git a/vpp-japi/japi/test/demo.java b/vpp-japi/japi/test/demo.java
index ef419d7..ea1db84 100644
--- a/vpp-japi/japi/test/demo.java
+++ b/vpp-japi/japi/test/demo.java
@@ -15,9 +15,11 @@
 
 import org.openvpp.vppjapi.*;
 
-public class demo extends vppApi {
+public class demo {
     public static void main (String[] args) throws Exception {
-        vppApi api = new vppApi ();
+        vppApi api = new vppApi ("JavaTest");
+        System.out.printf ("Connected OK...");
+
         String intlist;
         int [] contexts;
         int i, limit;
@@ -25,15 +27,6 @@
         int rv, errors, saved_error;
         long before, after;
 
-        rv = api.clientConnect ("JavaTest");
-        if (rv == 0)
-            System.out.printf ("Connected OK...");
-        else
-        {
-            System.out.printf ("clientConnect returned %d\n", rv);
-            System.exit (1);
-        }
-
         if (false)
         {
             intlist = api.getInterfaceList ("");
@@ -171,7 +164,7 @@
                            limit, after - before, 
                            limit / (after - before));
 
-        api.clientDisconnect();
+        api.close();
         System.out.printf ("Done...\n");
     }
 }
diff --git a/vpp-japi/japi/test/vppApi.java b/vpp-japi/japi/test/vppApi.java
index 96ba4a2..87af329 100644
--- a/vpp-japi/japi/test/vppApi.java
+++ b/vpp-japi/japi/test/vppApi.java
@@ -16,13 +16,13 @@
 import java.net.InetAddress;
 import org.openvpp.vppjapi.*;
 
-public class vppApi extends vppConn {
+public class vppApi {
 
     native int controlPing();
     native void test (byte[] array, byte[] array2);
 
     public static void main (String[] args) throws Exception {
-        vppApi api = new vppApi ();
+        vppConn api = new vppConn ();
         String ipv6 = "db01::feed";
         String ipv4 = "192.168.1.1";
         InetAddress addr6 = InetAddress.getByName(ipv6);
