public final class PluginExecutionRequest extends PluginRequest<Plugin> implements Runnable
Job.execute(ProgressReporter, String)
DbControl
if you doesn't need it
and you expect that the job takes a long time to execute. The job will
open it's own connection(s) to the database.
invoke()
to start executing of the job.
PluginResponse
and display a user-friendly message.
PluginRequest.done()
method, it is called
automatically by the core once the job has finished executing.PluginRequest.RequestImpl
Modifier and Type | Field and Description |
---|---|
private Job.ProgressReporterImpl |
progress |
private SignalReceiver |
signalReceiver |
Constructor and Description |
---|
PluginExecutionRequest(PluginRequest<? extends Plugin> copyFrom,
String command) |
PluginExecutionRequest(SessionControl sc,
Plugin plugin,
String command,
PluginConfiguration pluginConfiguration,
ParameterValuesImpl configurationParameters,
Job job,
ParameterValuesImpl jobParameters,
PluginDefinition pluginDefinition) |
Modifier and Type | Method and Description |
---|---|
PluginResponse |
invoke()
Invoke the plugin and let it do it's work.
|
void |
registerSignalReceiver(SignalReceiver signalReceiver)
Register a signal receiver that will receive signals for this job.
|
void |
run() |
(package private) void |
setProgressReporter(Job.ProgressReporterImpl progress)
Initialise a progress reporter that the plugin can use to store
progress information in the database.
|
done, getCommand, getCurrentConfigurationParameterValues, getCurrentJobParameterValues, getCurrentParameterValue, getCurrentParameterValues, getJob, getPlugin, getSessionControl, registerParameters, saveParameters, setNextCommand, setParameterValue, setParameterValues
private Job.ProgressReporterImpl progress
private SignalReceiver signalReceiver
PluginExecutionRequest(SessionControl sc, Plugin plugin, String command, PluginConfiguration pluginConfiguration, ParameterValuesImpl configurationParameters, Job job, ParameterValuesImpl jobParameters, PluginDefinition pluginDefinition)
PluginExecutionRequest(PluginRequest<? extends Plugin> copyFrom, String command)
public PluginResponse invoke()
PluginRequest
Response.Status.ERROR
and
the error messages will be available in the
PluginResponse.getMessage()
and
PluginResponse.getErrorList()
methods.invoke
in class PluginRequest<Plugin>
PluginResponse
objectvoid setProgressReporter(Job.ProgressReporterImpl progress)
public void registerSignalReceiver(SignalReceiver signalReceiver)
SignalTarget
interface
and provide a SignalHandler
. If not, the job will not be
registered with the signal receiver and it will not be possible to
send signals to the job.signalReceiver
- The signal recevier to use