-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Paulo Lopes <pmlopes@gmail.com>
- Loading branch information
Showing
3 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
es4x/src/main/java/io/reactiverse/es4x/impl/command/ES4XStartCommand.java
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* Copyright 2019 Red Hat, Inc. | ||
* | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
* and Apache License v2.0 which accompanies this distribution. | ||
* | ||
* The Eclipse Public License is available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
* | ||
* The Apache License v2.0 is available at | ||
* http://www.opensource.org/licenses/apache2.0.php | ||
* | ||
* You may elect to redistribute this code under either of these licenses. | ||
*/ | ||
package io.reactiverse.es4x.impl.command; | ||
|
||
import io.reactiverse.es4x.ES4X; | ||
import io.vertx.core.cli.annotations.Description; | ||
import io.vertx.core.cli.annotations.Name; | ||
import io.vertx.core.cli.annotations.Summary; | ||
import io.vertx.core.impl.launcher.commands.StartCommand; | ||
|
||
@Name(value = "start", priority = 1000) | ||
@Summary("Start a vert.x application in background") | ||
@Description("Start a vert.x application as a background service. The application is identified with an id that can be set using the `vertx-id` option. If not set a random UUID is generated. The application can be stopped with the `stop` command.") | ||
public class ES4XStartCommand extends StartCommand { | ||
|
||
public ES4XStartCommand() { | ||
super.setLauncherClass(ES4X.class.getName()); | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
es4x/src/main/java/io/reactiverse/es4x/impl/command/ES4XStartCommandFactory.java
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
* Copyright 2019 Red Hat, Inc. | ||
* | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
* and Apache License v2.0 which accompanies this distribution. | ||
* | ||
* The Eclipse Public License is available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
* | ||
* The Apache License v2.0 is available at | ||
* http://www.opensource.org/licenses/apache2.0.php | ||
* | ||
* You may elect to redistribute this code under either of these licenses. | ||
*/ | ||
package io.reactiverse.es4x.impl.command; | ||
|
||
import io.vertx.core.spi.launcher.DefaultCommandFactory; | ||
|
||
public class ES4XStartCommandFactory extends DefaultCommandFactory<ES4XStartCommand> { | ||
|
||
public ES4XStartCommandFactory() { | ||
super(ES4XStartCommand.class, ES4XStartCommand::new); | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
es4x/src/main/resources/META-INF/services/io.vertx.core.spi.launcher.CommandFactory
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 +1,2 @@ | ||
io.reactiverse.es4x.impl.command.ES4XRunCommandFactory | ||
io.reactiverse.es4x.impl.command.ES4XStartCommandFactory |