Package javarepl.console.rest

Examples of javarepl.console.rest.RestConsole


    private JavaREPLClient client;

    @Before
    public void setUp() throws Exception {
        int port = randomServerPort();
        console = new RestConsole(new SimpleConsole(ConsoleConfig.consoleConfig()), port);
        console.start();

        client = new JavaREPLClient("localhost", port);
    }
View Full Code Here


                .historyFile(historyFile(!sandboxed))
                .expressions(expressions)
                .sandboxed(sandboxed)
                .logger(logger);

        RestConsole console = new RestConsole(new TimingOutConsole(new SimpleConsole(consoleConfig), expressionTimeout(args), inactivityTimeout(args)), port);
        ExpressionReader reader = new ExpressionReader(ignoreConsole(args) ? ignoreConsoleInput() : readFromConsole());

        if (sandboxed)
            sandboxApplication();

        console.start();

        do {
            console.execute(reader.readExpression().getOrNull());
            logger.info("");
        } while (true);
    }
View Full Code Here

                        SearchHistory.class)
                .results(
                        result("date", new Date()),
                        result("num", 42));

        new RestConsole(new SimpleConsole(config), 8001);
    }
View Full Code Here

* More sophisticated (e.g. db or oauth backed) services can be created if needed.
*/
public class ConsoleWithAuthentication {

    public static void main(String... args) throws Exception {
        new RestConsole(new AuthConsole(new SimpleConsole(consoleConfig()), "password"), 8001);
    }
View Full Code Here

TOP

Related Classes of javarepl.console.rest.RestConsole

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.