Package org.crsh.shell

Examples of org.crsh.shell.ShellFactory.create()


        Boolean enabled = context.getProperty(WebPlugin.ENABLED);
        if (enabled != null && enabled) {
          log.fine("Using shell " + context);
          ShellFactory factory = context.getPlugin(ShellFactory.class);
          Principal user = wsSession.getUserPrincipal();
          Shell shell = factory.create(user);
          CRaSHSession session = new CRaSHSession(wsSession, shell);
          sessions.put(wsSession.getId(), session);
          log.fine("Established session " + wsSession.getId());
        } else {
          log.fine("Web plugin disabled");
View Full Code Here


    //
    if (port != null) {
      try {
        ShellFactory factory = bootstrap.getContext().getPlugin(ShellFactory.class);
        Shell shell = factory.create(null);
        RemoteClient client = new RemoteClient(port, shell);
        log.log(Level.INFO, "Callback back remote on port " + port);
        client.connect();
        client.getRunnable().run();
      }
View Full Code Here

      });

      //
      if (interactive) {
        ShellFactory factory = bootstrap.getContext().getPlugin(ShellFactory.class);
        shell = factory.create(null);
      } else {
        shell = null;
      }
      closeable = null;
    }
View Full Code Here

    //
    SpringBootstrap bootstrap = context.getBean(SpringBootstrap.class);

    // Test a bit
    ShellFactory factory = bootstrap.getContext().getPlugin(ShellFactory.class);
    Shell shell = factory.create(null);
    assertNotNull(shell);
    ShellProcess process = shell.createProcess("foo_cmd");
    assertNotNull(process);
    BaseProcessContext pc = BaseProcessContext.create(process).execute();
    assertTrue(pc.getResponse() instanceof ShellResponse.Ok);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.