Examples of CommandFactory


Examples of org.apache.sshd.server.CommandFactory

        sshd.setPort(8001);
        sshd.setKeyPairProvider(Utils.createTestHostKeyProvider());
        sshd.setSubsystemFactories(Arrays.<NamedFactory<Command>>asList(new SftpSubsystem.Factory()));
        sshd.setShellFactory(new EchoShellFactory());
//        sshd.setCommandFactory(new ScpCommandFactory());
        sshd.setCommandFactory(new CommandFactory() {
            public Command createCommand(String command) {
                if (command.startsWith("git-")) {
                    return new GitCommand(command.substring("git-".length()));
                } else {
                    return new UnknownCommand(command);
View Full Code Here

Examples of org.apache.sshd.server.CommandFactory

        sshd = SshServer.setUpDefaultServer();
        sshd.setPort(port);
        sshd.setKeyPairProvider(Utils.createTestHostKeyProvider());
        sshd.setShellFactory(new TestEchoShellFactory());
        sshd.setCommandFactory(new CommandFactory() {
            public Command createCommand(String command) {
                return new UnknownCommand(command);
            }
        });
        sshd.setPasswordAuthenticator(new BogusPasswordAuthenticator());
View Full Code Here

Examples of org.apache.sshd.server.CommandFactory

            public boolean canConnect(SshdSocketAddress address, Session session) {
                return true;
            }
        });
        sshd.setCommandFactory(new ScpCommandFactory(new CommandFactory() {
            public Command createCommand(String command) {
                EnumSet<ProcessShellFactory.TtyOptions> ttyOptions;
                if (OsUtils.isUNIX()) {
                    ttyOptions = EnumSet.of(ProcessShellFactory.TtyOptions.ONlCr);
                } else {
View Full Code Here

Examples of org.crsh.cli.impl.lang.CommandFactory

  /** . */
  private final CommandDescriptor<Instance<T>> descriptor;

  public ClassShellCommand(Class<T> clazz) throws IntrospectionException {
    CommandFactory factory = new CommandFactory(getClass().getClassLoader());
    this.clazz = clazz;
    this.descriptor = HelpDescriptor.create(factory.create(clazz));
  }
View Full Code Here

Examples of org.pentaho.reporting.libraries.pixie.wmf.records.CommandFactory

    minX = Integer.MAX_VALUE;
    minY = Integer.MAX_VALUE;
    maxWidth = 0;
    maxHeight = 0;

    final CommandFactory cmdFactory = CommandFactory.getInstance();
    MfRecord mf;
    while ((mf = readNextRecord()) != null)
    {
      final MfCmd cmd = cmdFactory.getCommand(mf.getType());
      if (cmd == null)
      {
        logger.info("Failed to parse record " + mf.getType());
      }
      else
View Full Code Here

Examples of uk.gov.nationalarchives.droid.command.action.CommandFactory

        String[] args = new String[] {
            "-k"
        };
       
        FilterFieldCommand command = mock(FilterFieldCommand.class);
        CommandFactory factory = mock(CommandFactory.class);
        when(factory.getFilterFieldCommand()).thenReturn(command);
        DroidCommandLine droidCommandLine = new DroidCommandLine(args);
       
        droidCommandLine.setContext(context);
       
        droidCommandLine.processExecution();
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.