public class CommandRunnable extends Object implements Runnable
| Constructor and Description |
|---|
CommandRunnable(CommandRunner.CommandInvocation commandInvocation,
ActionReport report,
BlockingQueue<CommandRunnable> responseQueue)
Construct a CommandRunnable.
|
| Modifier and Type | Method and Description |
|---|---|
ActionReport |
getActionReport()
Returns the ActionReport that was passed on the constructor.
|
CommandRunner.CommandInvocation |
getCommandInvocation()
Returns the CommandInvocation that was passed on the constructor
|
String |
getName()
Get the name that was previously set.
|
void |
run() |
void |
setName(String name)
Set a name on the runnable.
|
String |
toString() |
public CommandRunnable(CommandRunner.CommandInvocation commandInvocation, ActionReport report, BlockingQueue<CommandRunnable> responseQueue)
commandInvocation - A CommandInvocation containing the command you want to run.report - The ActionReport you used with the CommandInvocationresponseQueue - A blocking queue that this class will add itself to when its run method has completed.
After dispatching this class to a thread pool the caller can block on the response queue where it will dequeue
CommandRunnables and then use the getActionReport() method to retrieve the results.public void setName(String name)
name - The namepublic String getName()
public CommandRunner.CommandInvocation getCommandInvocation()
public ActionReport getActionReport()
Copyright © 2019. All rights reserved.