Package jline

Examples of jline.ConsoleReader


  private void cloneConnection(String connectionId) throws IOException {

    io.out.println(MessageFormat.format(getResource().getString(Constants
        .RES_CLONE_CLONING_CONN), connectionId ));

    ConsoleReader reader = new ConsoleReader();

    ConnectionBean connectionBean = readConnection(connectionId);

    // TODO(jarcec): Check that we have expected data
    MConnection connection = connectionBean.getConnections().get(0);
View Full Code Here


  private void createConnection(String connectorId) throws IOException {
    io.out.println(MessageFormat.format(getResource().getString(Constants
        .RES_CREATE_CREATING_CONN), connectorId));

    ConsoleReader reader = new ConsoleReader();

    FrameworkBean frameworkBean = readFramework();
    ConnectorBean connectorBean = readConnector(connectorId);

    MFramework framework = frameworkBean.getFramework();
View Full Code Here

  private void updateJob(String jobId) throws IOException {
    io.out.println(MessageFormat.format(getResource().getString(Constants
        .RES_UPDATE_UPDATING_JOB), jobId));

    ConsoleReader reader = new ConsoleReader();

    JobBean jobBean = readJob(jobId);

    // TODO(jarcec): Check that we have expected data
    MJob job = jobBean.getJobs().get(0);
View Full Code Here

  private void updateConnection(String connectionId) throws IOException {
    io.out.println(MessageFormat.format(getResource().getString(Constants
        .RES_UPDATE_UPDATING_CONN), connectionId));

    ConsoleReader reader = new ConsoleReader();

    ConnectionBean connectionBean = readConnection(connectionId);

    // TODO(jarcec): Check that we have expected data
    MConnection connection = connectionBean.getConnections().get(0);
View Full Code Here

  private void cloneJob(String jobId) throws IOException {
    MessageFormat.format(getResource().getString(Constants.RES_CLONE_CLONING_JOB),
        jobId);

    ConsoleReader reader = new ConsoleReader();

    JobBean jobBean = readJob(jobId);

    // TODO(jarcec): Check that we have expected data
    MJob job = jobBean.getJobs().get(0);
View Full Code Here

  private void createJob(String connectionId, String type) throws IOException {
    io.out.println(MessageFormat.format(getResource().getString(Constants
        .RES_CREATE_CREATING_JOB), connectionId));

    ConsoleReader reader = new ConsoleReader();

    FrameworkBean frameworkBean = readFramework();
    ConnectionBean connectionBean = readConnection(connectionId);
    ConnectorBean connectorBean;
View Full Code Here

                        "when executing pig with a pig script file)");
                return ReturnCode.ILLEGAL_ARGS;
            }
            // Interactive
            mode = ExecMode.SHELL;
            ConsoleReader reader = new ConsoleReader(System.in, new OutputStreamWriter(System.out));
            reader.setDefaultPrompt("grunt> ");
            final String HISTORYFILE = ".pig_history";
            String historyFile = System.getProperty("user.home") + File.separator  + HISTORYFILE;
            reader.setHistory(new History(new File(historyFile)));
            ConsoleReaderInputStream inputStream = new ConsoleReaderInputStream(reader);
            grunt = new Grunt(new BufferedReader(new InputStreamReader(inputStream)), pigContext);
            grunt.setConsoleReader(reader);
            gruntCalled = true;
            grunt.run();
View Full Code Here

        String localhost = InetAddress.getLocalHost().getHostName();
        String path = ZooUtil.getRoot(instance) + Constants.ZTRACERS;
        Tracer.getInstance().addReceiver(new ZooSpanClient(instance.getZooKeepers(), path, localhost, "shell", 1000));
      }
     
      this.reader = new ConsoleReader();
     
      if (passw == null)
        passw = reader.readLine("Enter current password for '" + user + "'@'" + instance.getInstanceName() + "': ", '*');
      if (passw == null) {
        reader.printNewline();
View Full Code Here

        if (!cl.hasOption("u") && !cl.hasOption("p")) {
          creds = SecurityConstants.getSystemCredentials();
        } else {
          if (pass == null) {
            try {
              pass = new ConsoleReader().readLine("Enter current password for '" + user + "': ", '*').getBytes();
            } catch (IOException ioe) {
              log.error("Password not specified and unable to prompt: " + ioe);
              System.exit(4);
            }
          }
View Full Code Here

    try {
      if (!cl.hasOption(fakeOption.getLongOpt())) {
        DistributedTrace.enable(instance, new ZooReader(instance), "shell", InetAddress.getLocalHost().getHostName());
      }
     
      this.reader = new ConsoleReader();
      Runtime.getRuntime().addShutdownHook(new Thread() {
        @Override
        public void start() {
          reader.getTerminal().enableEcho();
        }
View Full Code Here

TOP

Related Classes of jline.ConsoleReader

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.