-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Launcher/CommandExecutor: improved the logic for Command return value.
- Loading branch information
Robin Duda
committed
Mar 29, 2018
1 parent
d5aea6c
commit 399b2a9
Showing
15 changed files
with
104 additions
and
56 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
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
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
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
32 changes: 32 additions & 0 deletions
32
core/main/java/com/codingchili/core/context/CommandResult.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 @@ | ||
package com.codingchili.core.context; | ||
|
||
/** | ||
* @author Robin Duda | ||
* | ||
* Results returned from an #{@link Command} when it is | ||
* executed by a #{@link CommandExecutor}. | ||
* | ||
* If the command fails and wants to display the error message | ||
* (stacktrace) that generated the failure, then the future | ||
* passed from the #{@link CommandExecutor} should be failed, | ||
* with the exception. | ||
*/ | ||
public enum CommandResult { | ||
/** | ||
* Indicates that the command has executed successfully | ||
* and that the system should shut down. | ||
*/ | ||
SHUTDOWN, | ||
/** | ||
* Indicates that the command has executed successfully and | ||
* that the #{@link com.codingchili.core.Launcher} should continue | ||
* processing any deployment blocks. | ||
*/ | ||
CONTINUE, | ||
/** | ||
* Indicates that the command has executed successfully and that the | ||
* command is to handle deployment. The #{@link com.codingchili.core.Launcher} | ||
* should not process any deployment blocks. | ||
*/ | ||
STARTED | ||
} |
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
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
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
Oops, something went wrong.