-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
54 additions
and
129 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
/** | ||
* @author <a href="mailto:[email protected]">Julien Viet</a> | ||
*/ | ||
public class DeployShell extends AbstractVerticle { | ||
public class DeployShell extends VerticleBase { | ||
|
||
public static void main(String[] args) { | ||
Launcher launcher = new Launcher() { | ||
|
@@ -20,7 +20,7 @@ public void beforeStartingVertx(VertxOptions options) { | |
} | ||
|
||
@Override | ||
public void start(Promise<Void> startPromise) { | ||
public Future<?> start() { | ||
JsonObject options = new JsonObject().put("httpOptions", | ||
new JsonObject(). | ||
put("host", "localhost"). | ||
|
@@ -30,12 +30,6 @@ public void start(Promise<Void> startPromise) { | |
.put("config", new JsonObject() | ||
.put("file", "io/vertx/example/shell/deploy_service_http/auth.properties")))); | ||
|
||
vertx.deployVerticle("service:io.vertx.ext.shell", new DeploymentOptions().setConfig(options)).onComplete(ar -> { | ||
if (ar.succeeded()) { | ||
startPromise.complete(); | ||
} else { | ||
startPromise.fail(ar.cause()); | ||
} | ||
}); | ||
return vertx.deployVerticle("service:io.vertx.ext.shell", new DeploymentOptions().setConfig(options)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
/** | ||
* @author <a href="mailto:[email protected]">Julien Viet</a> | ||
*/ | ||
public class DeployShell extends AbstractVerticle { | ||
public class DeployShell extends VerticleBase { | ||
|
||
public static void main(String[] args) { | ||
Launcher launcher = new Launcher() { | ||
|
@@ -20,7 +20,7 @@ public void beforeStartingVertx(VertxOptions options) { | |
} | ||
|
||
@Override | ||
public void start(Promise<Void> startPromise) { | ||
public Future<?> start() { | ||
JsonObject options = new JsonObject().put("sshOptions", | ||
new JsonObject(). | ||
put("host", "localhost"). | ||
|
@@ -35,12 +35,6 @@ public void start(Promise<Void> startPromise) { | |
|
||
) | ||
); | ||
vertx.deployVerticle("service:io.vertx.ext.shell", new DeploymentOptions().setConfig(options)).onComplete(ar -> { | ||
if (ar.succeeded()) { | ||
startPromise.complete(); | ||
} else { | ||
startPromise.fail(ar.cause()); | ||
} | ||
}); | ||
return vertx.deployVerticle("service:io.vertx.ext.shell", new DeploymentOptions().setConfig(options)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
/** | ||
* @author <a href="mailto:[email protected]">Julien Viet</a> | ||
*/ | ||
public class DeployShell extends AbstractVerticle { | ||
public class DeployShell extends VerticleBase { | ||
|
||
public static void main(String[] args) { | ||
Launcher launcher = new Launcher() { | ||
|
@@ -20,18 +20,12 @@ public void beforeStartingVertx(VertxOptions options) { | |
} | ||
|
||
@Override | ||
public void start(Promise<Void> startPromise) { | ||
public Future<?> start() { | ||
JsonObject options = new JsonObject().put("telnetOptions", | ||
new JsonObject(). | ||
put("host", "localhost"). | ||
put("port", 3000) | ||
); | ||
vertx.deployVerticle("service:io.vertx.ext.shell", new DeploymentOptions().setConfig(options)).onComplete(ar -> { | ||
if (ar.succeeded()) { | ||
startPromise.complete(); | ||
} else { | ||
startPromise.fail(ar.cause()); | ||
} | ||
}); | ||
return vertx.deployVerticle("service:io.vertx.ext.shell", new DeploymentOptions().setConfig(options)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
package io.vertx.example.shell.echokeyboard; | ||
|
||
import io.vertx.core.AbstractVerticle; | ||
import io.vertx.core.Launcher; | ||
import io.vertx.core.VertxOptions; | ||
import io.vertx.core.*; | ||
import io.vertx.ext.dropwizard.DropwizardMetricsOptions; | ||
import io.vertx.ext.shell.ShellService; | ||
import io.vertx.ext.shell.ShellServiceOptions; | ||
|
@@ -14,7 +12,7 @@ | |
/** | ||
* @author <a href="mailto:[email protected]">Julien Viet</a> | ||
*/ | ||
public class EchoKeyboardCommand extends AbstractVerticle { | ||
public class EchoKeyboardCommand extends VerticleBase { | ||
|
||
public static void main(String[] args) { | ||
Launcher launcher = new Launcher() { | ||
|
@@ -27,7 +25,7 @@ public void beforeStartingVertx(VertxOptions options) { | |
} | ||
|
||
@Override | ||
public void start() throws Exception { | ||
public Future<?> start() throws Exception { | ||
|
||
Command starwars = CommandBuilder.command("echokeyboard"). | ||
processHandler(process -> { | ||
|
@@ -48,10 +46,6 @@ public void start() throws Exception { | |
new TelnetTermOptions().setHost("localhost").setPort(3000) | ||
)); | ||
CommandRegistry.getShared(vertx).registerCommand(starwars); | ||
service.start().onComplete(ar -> { | ||
if (!ar.succeeded()) { | ||
ar.cause().printStackTrace(); | ||
} | ||
}); | ||
return service.start(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
package io.vertx.example.shell.helloworld; | ||
|
||
import io.vertx.core.AbstractVerticle; | ||
import io.vertx.core.Launcher; | ||
import io.vertx.core.VertxOptions; | ||
import io.vertx.core.*; | ||
import io.vertx.ext.dropwizard.DropwizardMetricsOptions; | ||
import io.vertx.ext.shell.ShellService; | ||
import io.vertx.ext.shell.ShellServiceOptions; | ||
|
@@ -14,7 +12,7 @@ | |
/* | ||
* @author <a href="mailto:[email protected]">Julien Viet</a> | ||
*/ | ||
public class HelloWorldCommand extends AbstractVerticle { | ||
public class HelloWorldCommand extends VerticleBase { | ||
|
||
public static void main(String[] args) { | ||
Launcher launcher = new Launcher() { | ||
|
@@ -27,7 +25,7 @@ public void beforeStartingVertx(VertxOptions options) { | |
} | ||
|
||
@Override | ||
public void start() throws Exception { | ||
public Future<?> start() { | ||
|
||
Command helloWorld = CommandBuilder.command("hello-world"). | ||
processHandler(process -> { | ||
|
@@ -39,10 +37,6 @@ public void start() throws Exception { | |
new TelnetTermOptions().setHost("localhost").setPort(3000) | ||
)); | ||
CommandRegistry.getShared(vertx).registerCommand(helloWorld); | ||
service.start().onComplete(ar -> { | ||
if (!ar.succeeded()) { | ||
ar.cause().printStackTrace(); | ||
} | ||
}); | ||
return service.start(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,6 @@ | ||
package io.vertx.example.shell.run_service_http; | ||
|
||
import io.vertx.core.AbstractVerticle; | ||
import io.vertx.core.Launcher; | ||
import io.vertx.core.Promise; | ||
import io.vertx.core.VertxOptions; | ||
import io.vertx.core.*; | ||
import io.vertx.core.json.JsonObject; | ||
import io.vertx.ext.dropwizard.DropwizardMetricsOptions; | ||
import io.vertx.ext.shell.ShellService; | ||
|
@@ -13,7 +10,7 @@ | |
/** | ||
* @author <a href="mailto:[email protected]">Julien Viet</a> | ||
*/ | ||
public class RunShell extends AbstractVerticle { | ||
public class RunShell extends VerticleBase { | ||
|
||
public static void main(String[] args) { | ||
Launcher launcher = new Launcher() { | ||
|
@@ -26,7 +23,7 @@ public void beforeStartingVertx(VertxOptions options) { | |
} | ||
|
||
@Override | ||
public void start(Promise<Void> startPromise) { | ||
public Future<?> start() { | ||
ShellService service = ShellService.create(vertx, new ShellServiceOptions(). | ||
setHttpOptions( | ||
new HttpTermOptions(). | ||
|
@@ -36,6 +33,6 @@ public void start(Promise<Void> startPromise) { | |
.put("provider", "properties") | ||
.put("config", new JsonObject() | ||
.put("file", "io/vertx/example/shell/run_service_http/auth.properties"))))); | ||
service.start().onComplete(startPromise); | ||
return service.start(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,6 @@ | ||
package io.vertx.example.shell.run_service_ssh; | ||
|
||
import io.vertx.core.AbstractVerticle; | ||
import io.vertx.core.Launcher; | ||
import io.vertx.core.Promise; | ||
import io.vertx.core.VertxOptions; | ||
import io.vertx.core.*; | ||
import io.vertx.core.json.JsonObject; | ||
import io.vertx.core.net.JksOptions; | ||
import io.vertx.ext.dropwizard.DropwizardMetricsOptions; | ||
|
@@ -14,7 +11,7 @@ | |
/** | ||
* @author <a href="mailto:[email protected]">Julien Viet</a> | ||
*/ | ||
public class RunShell extends AbstractVerticle { | ||
public class RunShell extends VerticleBase { | ||
|
||
public static void main(String[] args) { | ||
Launcher launcher = new Launcher() { | ||
|
@@ -27,7 +24,7 @@ public void beforeStartingVertx(VertxOptions options) { | |
} | ||
|
||
@Override | ||
public void start(Promise<Void> startPromise) { | ||
public Future<?> start() { | ||
ShellService service = ShellService.create(vertx, new ShellServiceOptions(). | ||
setSSHOptions( | ||
new SSHTermOptions(). | ||
|
@@ -40,8 +37,6 @@ public void start(Promise<Void> startPromise) { | |
.put("provider", "properties") | ||
.put("config", new JsonObject() | ||
.put("file", "io/vertx/example/shell/run_service_ssh/auth.properties"))))); | ||
service | ||
.start() | ||
.onComplete(startPromise); | ||
return service.start(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
package io.vertx.example.shell.run_service_telnet; | ||
|
||
import io.vertx.core.AbstractVerticle; | ||
import io.vertx.core.Launcher; | ||
import io.vertx.core.VertxOptions; | ||
import io.vertx.core.*; | ||
import io.vertx.ext.dropwizard.DropwizardMetricsOptions; | ||
import io.vertx.ext.shell.ShellService; | ||
import io.vertx.ext.shell.ShellServiceOptions; | ||
|
@@ -11,7 +9,7 @@ | |
/** | ||
* @author <a href="mailto:[email protected]">Julien Viet</a> | ||
*/ | ||
public class RunShell extends AbstractVerticle { | ||
public class RunShell extends VerticleBase { | ||
|
||
public static void main(String[] args) { | ||
Launcher launcher = new Launcher() { | ||
|
@@ -24,10 +22,10 @@ public void beforeStartingVertx(VertxOptions options) { | |
} | ||
|
||
@Override | ||
public void start() throws Exception { | ||
public Future<?> start() throws Exception { | ||
ShellService service = ShellService.create(vertx, new ShellServiceOptions().setTelnetOptions( | ||
new TelnetTermOptions().setHost("localhost").setPort(3000) | ||
)); | ||
service.start(); | ||
return service.start(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
package io.vertx.example.shell.starwars; | ||
|
||
import io.vertx.core.AbstractVerticle; | ||
import io.vertx.core.Launcher; | ||
import io.vertx.core.VertxOptions; | ||
import io.vertx.core.*; | ||
import io.vertx.core.net.NetClient; | ||
import io.vertx.core.net.NetSocket; | ||
import io.vertx.ext.dropwizard.DropwizardMetricsOptions; | ||
|
@@ -16,7 +14,7 @@ | |
/** | ||
* @author <a href="mailto:[email protected]">Julien Viet</a> | ||
*/ | ||
public class StarwarsCommand extends AbstractVerticle { | ||
public class StarwarsCommand extends VerticleBase { | ||
|
||
public static void main(String[] args) { | ||
Launcher launcher = new Launcher() { | ||
|
@@ -29,7 +27,7 @@ public void beforeStartingVertx(VertxOptions options) { | |
} | ||
|
||
@Override | ||
public void start() throws Exception { | ||
public Future<?> start() throws Exception { | ||
|
||
Command starwars = CommandBuilder.command("starwars"). | ||
processHandler(process -> { | ||
|
@@ -68,10 +66,6 @@ public void start() throws Exception { | |
new TelnetTermOptions().setHost("localhost").setPort(3000) | ||
)); | ||
CommandRegistry.getShared(vertx).registerCommand(starwars); | ||
service.start().onComplete(ar -> { | ||
if (!ar.succeeded()) { | ||
ar.cause().printStackTrace(); | ||
} | ||
}); | ||
return service.start(); | ||
} | ||
} |
Oops, something went wrong.