Package com.hcl.labs.domi
Class MainVerticle
- java.lang.Object
-
- io.vertx.core.AbstractVerticle
-
- com.hcl.labs.domi.MainVerticle
-
- All Implemented Interfaces:
io.vertx.core.Verticle
public class MainVerticle extends io.vertx.core.AbstractVerticle
- Author:
- Paul Withers Entry point and Vert.x Verticle
-
-
Field Summary
Fields Modifier and Type Field Description static String
HEADER_GNU_TP
static String
X_HEADER
-
Constructor Summary
Constructors Constructor Description MainVerticle(String configDir)
Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static boolean
isDebug()
Check if the application gets started in debug mode this will extend the loop timeout to avoid warnings of debugger blocking the event loopstatic io.vertx.core.Future<io.vertx.core.json.JsonObject>
loadConfig(io.vertx.core.Vertx vertx, String configDirName)
Loads the configuration from the internal configuration file or JSON file that is in the configuration directorystatic void
main(String[] args)
Entrypoint, initialising and running an instance of this classstatic void
runVerticle(MainVerticle mainVerticle)
Loads config and runs an instance of this class using current Vert.x instancevoid
start(io.vertx.core.Promise<Void> startPromise)
-
-
-
Field Detail
-
X_HEADER
public static final String X_HEADER
- See Also:
- Constant Field Values
-
HEADER_GNU_TP
public static final String HEADER_GNU_TP
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MainVerticle
public MainVerticle(String configDir)
Constructor- Parameters:
configDir
- where JSON configuration files can be found
-
-
Method Detail
-
isDebug
public static boolean isDebug()
Check if the application gets started in debug mode this will extend the loop timeout to avoid warnings of debugger blocking the event loop- Returns:
- true if debug mode
-
loadConfig
public static io.vertx.core.Future<io.vertx.core.json.JsonObject> loadConfig(io.vertx.core.Vertx vertx, String configDirName)
Loads the configuration from the internal configuration file or JSON file that is in the configuration directory- Parameters:
vertx
- - the vertx instanceconfigDirName
- - the configuration directory- Returns:
- Future with a configuration
-
main
public static void main(String[] args)
Entrypoint, initialising and running an instance of this class- Parameters:
args
- configuration directory
-
runVerticle
public static void runVerticle(MainVerticle mainVerticle)
Loads config and runs an instance of this class using current Vert.x instance- Parameters:
mainVerticle
- to run
-
-