Package org.crsh.util

Examples of org.crsh.util.Statement


            // 1/ cancel the process
            // 2/ wait a few milli seconds
            // 3/ if it's not ended then we end it

            final ClientProcessContext context = current;
            Statement statements = new Statement() {
              @Override
              protected void run() throws Throwable {
                context.end(ShellResponse.cancelled());
              }
            }.with(new Statement() {
              @Override
              protected void run() throws Throwable {
                context.process.cancel();
              }
            });
            statements.all();
          }
        } else if (msg instanceof ClientMessage.Close) {
          close();
        }
      }
View Full Code Here


  void execute() {
    try {
      process.execute(this);
    }
    catch(final Throwable t) {
      new Statement() {
        @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));
        }
View Full Code Here

TOP

Related Classes of org.crsh.util.Statement

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.