public interface ImmediateDownloadExporter extends Plugin
The plugin will be loaded and initialised normally and a
job configuration sequence is started by a call to
InteractivePlugin.configure(GuiContext, Request, Response)
.
When the configuration is complete the plugin may respond with
a Response.setDownloadImmediately(String, Job.ExecutionTime, boolean)
instead of a Response.setDone(String, Job.ExecutionTime)
. This will prevent the
core from saving a job in the job queue. Instead it will call the
doExport(ExportOutputStream, ProgressReporter)
method to let the plugin
generate it's output. The Plugin.run(Request, Response, ProgressReporter)
method is never called.
Note that this feature requires that the plugin is executed in the same virtual machine and prevents the use of job agents. Plugins should not use immediate export if they use a lot of memory, requires long running times or consumes other resources that may cause problems for other code.
Plugin.MainType
Modifier and Type | Method and Description |
---|---|
void |
doExport(ExportOutputStream out,
ProgressReporter progress)
Perform the export.
|
done, getMainType, getPermissions, init, requiresConfiguration, run, supportsConfigurations
void doExport(ExportOutputStream out, ProgressReporter progress) throws IOException
out
- The output stream that the exported data should be written toprogress
- An optional progress reporter, may be nullIOException
- If there is an error writing to the export stream