Package io.jmix.flowui.devserver
Class DevServerOutputTracker
java.lang.Object
io.jmix.flowui.devserver.DevServerOutputTracker
Tracks the output of a dev server and scans for given success and/or failure
 patterns while copying the dev server output to standard output.
 
Triggers an event whenever a success or failure pattern is found on a row.
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classEncapsulates the result of a find operation.
- 
Constructor SummaryConstructorsConstructorDescriptionDevServerOutputTracker(InputStream inputStream, Pattern success, Pattern failure, Consumer<DevServerOutputTracker.Result> onMatch) Creates a new finder that scans for the given success and/or failure pattern.
- 
Method SummaryModifier and TypeMethodDescriptionbooleanawaitFirstMatch(int timeoutInSeconds) Blocks until the first match is found and the callback has been run.voidfind()Runs the find operation.serverRestartGuard(Pattern restartingPattern, Pattern restartedPattern) Gets a guard object that blocks the current request to dev-server when dev-server is performing a restart operation.
- 
Constructor Details- 
DevServerOutputTrackerpublic DevServerOutputTracker(InputStream inputStream, Pattern success, Pattern failure, Consumer<DevServerOutputTracker.Result> onMatch) Creates a new finder that scans for the given success and/or failure pattern.- Parameters:
- inputStream- the stream to scan
- success- the pattern indicating success
- failure- the pattern indicating failure
- onMatch- callback triggered when either success or failure is found
 
 
- 
- 
Method Details- 
serverRestartGuardGets a guard object that blocks the current request to dev-server when dev-server is performing a restart operation.- Parameters:
- restartingPattern- a pattern to match with the output to determine that the server is restarting.
- restartedPattern- a pattern to match with the output to determine that the server has been restarted.
- Returns:
- a Runnableinstance that blocks execution during dev server restarts, never null.
 
- 
findpublic void find()Runs the find operation.
- 
awaitFirstMatchBlocks until the first match is found and the callback has been run.- Parameters:
- timeoutInSeconds- the maximum number of seconds to wait
- Returns:
- trueif a match was found,- falseif a timeout occurred
- Throws:
- InterruptedException- if the finder thread is interrupted
 
 
-