@Override protected void run() throws Throwable { // If it's not executing then we attempt to end it end(ShellResponse.error(ErrorKind.INTERNAL, "Unexpected process execution error", t)); } }.all();
public int getHeight() { if (!closed) { ensureSize(); return client.getHeight(); } else { return -1; } }
public synchronized void end(ShellResponse response) { // It may have been cancelled concurrently if (client.current == this) { // Flush what we have in buffer first flush(); // Send end message try { client.current = null; client.out.writeObject(new ServerMessage.End(response)); client.out.flush(); } catch (IOException ignore) { // } finally { closed = true; if (response instanceof ShellResponse.Close) { client.close(); } } } } }
height = execute.height; last = System.currentTimeMillis(); current = new ClientProcessContext(this, shell.createProcess(execute.line)); current.execute(); } else if (msg instanceof ClientMessage.Cancel) { if (current != null) {
@Override public Screenable append(CharSequence csq, int start, int end) throws IOException { return append(csq.subSequence(start, end)); }
height = execute.height; last = System.currentTimeMillis(); current = new ClientProcessContext(this, shell.createProcess(execute.line)); current.execute(); } else if (msg instanceof ClientMessage.Cancel) { if (current != null) {
@Override public Screenable append(char c) throws IOException { return append(Character.toString(c)); }
height = execute.height; last = System.currentTimeMillis(); current = new ClientProcessContext(this, shell.createProcess(execute.line)); current.execute(); } else if (msg instanceof ClientMessage.Cancel) { if (current != null) {
public int getWidth() { if (!closed) { ensureSize(); return client.getWidth(); } else { return -1; } }
@Override protected void run() throws Throwable { // If it's not executing then we attempt to end it end(ShellResponse.error(ErrorKind.INTERNAL, "Unexpected process execution error", t)); } }.all();
public synchronized void end(ShellResponse response) { // It may have been cancelled concurrently if (client.current == this) { // Flush what we have in buffer first flush(); // Send end message try { client.current = null; client.out.writeObject(new ServerMessage.End(response)); client.out.flush(); } catch (IOException ignore) { // } finally { closed = true; if (response instanceof ShellResponse.Close) { client.close(); } } } } }
@Override public Screenable append(CharSequence csq, int start, int end) throws IOException { return append(csq.subSequence(start, end)); }
height = execute.height; last = System.currentTimeMillis(); current = new ClientProcessContext(this, shell.createProcess(execute.line)); current.execute(); } else if (msg instanceof ClientMessage.Cancel) { if (current != null) {
public int getHeight() { if (!closed) { ensureSize(); return client.getHeight(); } else { return -1; } }
@Override protected void run() throws Throwable { // If it's not executing then we attempt to end it end(ShellResponse.error(ErrorKind.INTERNAL, "Unexpected process execution error", t)); } }.all();
public synchronized void end(ShellResponse response) { // It may have been cancelled concurrently if (client.current == this) { // Flush what we have in buffer first flush(); // Send end message try { client.current = null; client.out.writeObject(new ServerMessage.End(response)); client.out.flush(); } catch (IOException ignore) { // } finally { closed = true; if (response instanceof ShellResponse.Close) { client.close(); } } } } }
@Override public Screenable append(char c) throws IOException { return append(Character.toString(c)); }
public int getWidth() { if (!closed) { ensureSize(); return client.getWidth(); } else { return -1; } }
@Override protected void run() throws Throwable { // If it's not executing then we attempt to end it end(ShellResponse.error(ErrorType.INTERNAL, "Unexpected process execution error", t)); } }.all();
public synchronized void end(ShellResponse response) { // It may have been cancelled concurrently if (client.current == this) { // Flush what we have in buffer first flush(); // Send end message try { client.current = null; client.out.writeObject(new ServerMessage.End(response)); client.out.flush(); } catch (IOException ignore) { // } finally { closed = true; if (response instanceof ShellResponse.Close) { client.close(); } } } } }