@Override public void execute(Lookup ctx, ExitCommand cmd) { PrintWriter pw = ctx.lookup(PrintWriter.class); if (pw != null) { pw.println(); pw.println("Target application has quit with code " + cmd.getExitCode()); pw.flush(); } Client c = ctx.lookup(Client.class); if (c != null) { try { Channel ch = ctx.lookup(Channel.class); if (ch != null) { ch.sendResponse(cmd, ACKCommand.class, true); } } catch (IOException e) { BTraceLogger.debugPrint(e); } try { Thread.sleep(500); // let the other side some time to handle the response } catch (InterruptedException e) { Thread.currentThread().interrupt(); } c.agentExit(cmd.getExitCode()); } } }
@Override public void execute(Lookup ctx, ExitCommand cmd) { PrintWriter pw = ctx.lookup(PrintWriter.class); if (pw != null) { pw.println(); pw.println("Target application has quit with code " + cmd.getExitCode()); pw.flush(); } Client c = ctx.lookup(Client.class); if (c != null) { try { Channel ch = ctx.lookup(Channel.class); if (ch != null) { ch.sendResponse(cmd, ACKCommand.class, true); } } catch (IOException e) { BTraceLogger.debugPrint(e); } try { Thread.sleep(500); // let the other side some time to handle the response } catch (InterruptedException e) { Thread.currentThread().interrupt(); } c.agentExit(cmd.getExitCode()); } } }
@Override public void execute(Lookup ctx, final ExitCommand cmd) { BTraceLogger.debugPrint("received exit command with exit code " + cmd.getExitCode()); final Channel ch = ctx.lookup(Channel.class); if (ch != null) {
@Override public void execute(Lookup ctx, final ExitCommand cmd) { BTraceLogger.debugPrint("received exit command with exit code " + cmd.getExitCode()); final Channel ch = ctx.lookup(Channel.class); if (ch != null) {