@Override public void end(final ShellResponse response) { Status status = Status.SERVER_ERROR; if (response instanceof ShellResponse.Ok) { status = Status.OK; } else if (response instanceof ShellResponse.UnknownCommand) { status = Status.BAD_REQUEST; } deferred.accept(Results.with(buff.length() == 0 ? response.getMessage() : buff, status)); }
public void end(ShellResponse response) { CRaSHConnector.log.fine("Ended \"" + command + "\""); session.current.compareAndSet(this, null); flush(); String msg = response.getMessage(); if (msg.length() > 0) { session.send("print", msg); } String prompt = session.shell.getPrompt(); session.send("prompt", prompt); session.send("end"); }
processor.status = Status.AVAILABLE; } else { final String message = response.getMessage(); runnable = new Runnable() { public void run() {
String msg = response.getMessage(); if (msg.length() > 0) { console.driver.write(msg);
errorMsg = "Error during command execution : " + response.getMessage();
public void testAsyncEvaluation() throws InterruptedException { AsyncShell connector = new AsyncShell(Executors.newSingleThreadExecutor(), lifeCycle.createShell()); status = 0; BaseProcessContext ctx = BaseProcessContext.create(connector, "invoke " + AsyncShellTestCase.class.getName() + " bilto"); ctx.execute(); ShellResponse resp = ctx.getResponse(); assertTrue("Was not expecting response to be " + resp.getMessage(), resp instanceof ShellResponse.Ok); assertEquals(1, status); ctx.getResponse(); }
public void end(ShellResponse response) { CRaSHConnector.log.fine("Ended \"" + command + "\""); session.current.compareAndSet(this, null); flush(); String msg = response.getMessage(); if (msg.length() > 0) { session.send("print", msg); } String prompt = session.shell.getPrompt(); session.send("prompt", prompt); session.send("end"); }
String msg = response.getMessage(); if (msg.length() > 0) { writer.write(msg);
processor.status = Status.AVAILABLE; } else { final String message = response.getMessage(); runnable = new Runnable() { public void run() {
processor.status = Status.AVAILABLE; } else { final String message = response.getMessage(); runnable = new Runnable() { public void run() {
String msg = response.getMessage(); if (msg.length() > 0) { console.driver.write(msg);
String msg = response.getMessage(); if (msg.length() > 0) { console.driver.write(msg);
errorMsg = "Error during command execution : " + response.getMessage();
errorMsg = "Error during command execution : " + response.getMessage();
errorMsg = "Error during command execution : " + response.getMessage();