/** * Removes the client handle from the pending list (in case it's still there), and unrefs * the server. */ void unregister(AbstractAppHandle handle) { for (Map.Entry<String, AbstractAppHandle> e : secretToPendingApps.entrySet()) { if (e.getValue().equals(handle)) { String secret = e.getKey(); secretToPendingApps.remove(secret); break; } } unref(); }
/** * Removes the client handle from the pending list (in case it's still there), and unrefs * the server. */ void unregister(AbstractAppHandle handle) { for (Map.Entry<String, AbstractAppHandle> e : secretToPendingApps.entrySet()) { if (e.getValue().equals(handle)) { String secret = e.getKey(); secretToPendingApps.remove(secret); break; } } unref(); }
/** * Removes the client handle from the pending list (in case it's still there), and unrefs * the server. */ void unregister(ChildProcAppHandle handle) { pending.remove(handle.getSecret()); unref(); }
/** * Removes the client handle from the pending list (in case it's still there), and unrefs * the server. */ void unregister(ChildProcAppHandle handle) { pending.remove(handle.getSecret()); unref(); }
@Test public void testLauncherServerReuse() throws Exception { LauncherServer server1 = LauncherServer.getOrCreateServer(); ChildProcAppHandle handle = new ChildProcAppHandle(server1); handle.kill(); LauncherServer server2 = LauncherServer.getOrCreateServer(); try { assertNotSame(server1, server2); } finally { server2.unref(); } }