| Constructor and Description |
|---|
CommandOutputTrigger(ResponseProvider<Runnable> callbackMap,
CommandFuture commandExecution)
Create a
CommandOutputTrigger for a running command using the
provided ResponseProvider. |
CommandOutputTrigger(ResponseProvider<Runnable> callbackMap,
CommandFuture commandExecution,
Executor executor)
Create a
CommandOutputTrigger for a running command using the
provided ResponseProvider. |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
processToken(String matchedToken) |
Future<Void> |
start()
Asynchronously starts an interaction.
|
Future<Void> |
start(String tokenDelimiterRegex)
Asynchronously starts an interaction.
|
public CommandOutputTrigger(ResponseProvider<Runnable> callbackMap, CommandFuture commandExecution)
CommandOutputTrigger for a running command using the
provided ResponseProvider. By default, the Runnable obtained
from the ResponseProvider will be executed by the same thread.callbackMap - The ResponseProvider to usecommandExecution - The executing commandpublic CommandOutputTrigger(ResponseProvider<Runnable> callbackMap, CommandFuture commandExecution, Executor executor)
CommandOutputTrigger for a running command using the
provided ResponseProvider. The Runnable obtained from the
ResponseProvider will be executed by the provided Executor.callbackMap - The ResponseProvider to usecommandExecution - The executing commandexecutor - The executor to use for executing the Runnablesprotected boolean processToken(String matchedToken)
matchedToken - The string tokenpublic final Future<Void> start()
start again
has no effect.Future<?> which represents the asynchronous execution
of the stream processing.