Package org.twdata.enchanter.impl

Examples of org.twdata.enchanter.impl.DefaultStreamConnection


     */
    private void executeInPython(String scriptContent, Map<String, String> configs)
    {
        // The script interpreter
        final PythonInterpreter interp = new PythonInterpreter();
        final StreamConnection conn = new DefaultStreamConnection();

        // info for users
        if (getProject() != null)
        {
            getLog().info("variable mavenProject available");
View Full Code Here


       
        args = rec.processForLearningMode(args);

        String filePath = args[0];

        DefaultStreamConnection streamConnection = new DefaultStreamConnection();
       
        Interpreter i = new Interpreter();
       
        // deprecated
        i.set("ssh", streamConnection);
View Full Code Here

        args = rec.processForLearningMode(args);

        String filePath = args[0];

        IRuby runtime = JavaEmbedUtils.initialize(Collections.singletonList("."));
        IRubyObject conn = JavaEmbedUtils.javaToRuby(runtime, new DefaultStreamConnection());

        try {
          // deprecated
            runtime.getGlobalVariables().set(GlobalVariable.variableName("ssh"), conn);
           
View Full Code Here

        args = rec.processForLearningMode(args);

        String filePath = args[0];

        PythonInterpreter interp = new PythonInterpreter();
        StreamConnection conn = new DefaultStreamConnection();
       
        // deprecated
        interp.set("ssh", conn);
        interp.set("conn", conn);
        interp.set("args", args);
View Full Code Here

            int port = ((Integer) parser.getOptionValue(optPort, Integer.valueOf(22))).intValue();
            String username = (String) parser.getOptionValue(optUsername);
            String password = (String) parser.getOptionValue(optPassword, "");
            setPromptSize(((Integer) parser.getOptionValue(optPromptSize, Integer.valueOf(10))).intValue());
           
            StreamConnection streamConnection = new DefaultStreamConnection();
            streamConnection.addStreamListener(this);
            streamConnection.connect(host, port, username, password);
            startRecording(parser.getRemainingArgs()[0], host, port, username, password);
            ConsoleReader reader = new ConsoleReader();
            Thread t = new Thread(reader);
            t.start();
            streamConnection.waitFor("asfdasfasfdSomeStringThatDoesntExistasdfasdf");
            endRecording();
            System.exit(0);
        }
       
        return parser.getRemainingArgs();
View Full Code Here

TOP

Related Classes of org.twdata.enchanter.impl.DefaultStreamConnection

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.