Created
November 19, 2019 20:02
-
-
Save sohangp/c8f379e66a0a88c854e5e5937de42529 to your computer and use it in GitHub Desktop.
Starting the Embedded Engine
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
private final Executor executor = Executors.newSingleThreadExecutor(); | |
... | |
@PostConstruct | |
private void start() { | |
this.executor.execute(engine); | |
} | |
@PreDestroy | |
private void stop() { | |
if (this.engine != null) { | |
this.engine.stop(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment