Search in sources :

Example 1 with HttpTermOptions

use of io.vertx.ext.shell.term.HttpTermOptions in project vertx-examples by vert-x3.

the class RunShell method start.

@Override
public void start(Future<Void> startFuture) throws Exception {
    ShellService service = ShellService.create(vertx, new ShellServiceOptions().setHttpOptions(new HttpTermOptions().setHost("localhost").setPort(8080).setAuthOptions(new ShiroAuthOptions().setConfig(new JsonObject().put("properties_path", "auth.properties")))));
    service.start(ar -> {
        if (ar.succeeded()) {
            startFuture.succeeded();
        } else {
            startFuture.fail(ar.cause());
        }
    });
}
Also used : ShellService(io.vertx.ext.shell.ShellService) HttpTermOptions(io.vertx.ext.shell.term.HttpTermOptions) ShellServiceOptions(io.vertx.ext.shell.ShellServiceOptions) ShiroAuthOptions(io.vertx.ext.auth.shiro.ShiroAuthOptions) JsonObject(io.vertx.core.json.JsonObject)

Example 2 with HttpTermOptions

use of io.vertx.ext.shell.term.HttpTermOptions in project vertx-examples by vert-x3.

the class RunShell method start.

@Override
public void start(Promise<Void> startPromise) throws Exception {
    ShellService service = ShellService.create(vertx, new ShellServiceOptions().setHttpOptions(new HttpTermOptions().setHost("localhost").setPort(8080).setAuthOptions(new ShiroAuthOptions().setConfig(new JsonObject().put("properties_path", "auth.properties")))));
    service.start(startPromise);
}
Also used : ShellService(io.vertx.ext.shell.ShellService) HttpTermOptions(io.vertx.ext.shell.term.HttpTermOptions) ShellServiceOptions(io.vertx.ext.shell.ShellServiceOptions) ShiroAuthOptions(io.vertx.ext.auth.shiro.ShiroAuthOptions) JsonObject(io.vertx.core.json.JsonObject)

Aggregations

JsonObject (io.vertx.core.json.JsonObject)2 ShiroAuthOptions (io.vertx.ext.auth.shiro.ShiroAuthOptions)2 ShellService (io.vertx.ext.shell.ShellService)2 ShellServiceOptions (io.vertx.ext.shell.ShellServiceOptions)2 HttpTermOptions (io.vertx.ext.shell.term.HttpTermOptions)2