public class OutputManager extends IzouModule implements AddonThreadPoolUser
log, main
Constructor and Description |
---|
OutputManager(Main main)
Creates a new output-manager with a list of output-plugins
|
Modifier and Type | Method and Description |
---|---|
void |
addOutputExtension(OutputExtensionModel<?,?> outputExtension)
adds output extension to desired outputPlugin
|
void |
addOutputPlugin(OutputPluginModel<?,?> outputPlugin)
adds outputPlugin to outputPluginList, starts a new thread for the outputPlugin, and stores the future object in a HashMap
|
<T,X> List<CompletableFuture<X>> |
generateAllOutputExtensions(OutputPluginModel<T,X> outputPlugin,
T t,
EventModel event)
starts every associated OutputExtension
|
List<Identification> |
getAssociatedOutputExtension(OutputPluginModel<?,?> outputPlugin)
returns all the associated OutputExtensions
|
void |
passDataToOutputPlugins(EventModel event)
gets the Event and sends it to the right outputPlugin for further processing
|
void |
removeOutputExtension(OutputExtensionModel<?,?> outputExtension)
removes the output-extension of id: extensionId from outputPluginList
|
void |
removeOutputPlugin(OutputPluginModel outputPlugin)
removes the OutputPlugin and stops the thread
|
debug, debug, error, error, fatal, fatal, getID, getMain
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
submit, submit, timeOut
debug, debug, error, error, fatal, fatal, getMain
isOwner
public OutputManager(Main main)
main
- the main instance started frompublic void addOutputPlugin(OutputPluginModel<?,?> outputPlugin) throws IllegalIDException
outputPlugin
- OutputPlugin to addIllegalIDException
- not yet implementedpublic void removeOutputPlugin(OutputPluginModel outputPlugin)
outputPlugin
- the outputPlugin to removepublic void addOutputExtension(OutputExtensionModel<?,?> outputExtension) throws IllegalIDException
adds output extension to desired outputPlugin, so that the output-plugin can start and stop the outputExtension task as needed. The outputExtension is specific to the output-plugin
outputExtension
- the outputExtension to be addedIllegalIDException
- not yet implementedpublic void removeOutputExtension(OutputExtensionModel<?,?> outputExtension)
outputExtension
- the OutputExtension to removepublic void passDataToOutputPlugins(EventModel event)
passDataToOutputPlugins is the main method of OutputManger. It is called whenever the output process has to be started
event
- an Instance of Eventpublic List<Identification> getAssociatedOutputExtension(OutputPluginModel<?,?> outputPlugin)
outputPlugin
- the OutputPlugin to search forpublic <T,X> List<CompletableFuture<X>> generateAllOutputExtensions(OutputPluginModel<T,X> outputPlugin, T t, EventModel event)
T
- the type of the argumentX
- the return typeoutputPlugin
- the OutputPlugin to generate the Data fort
- the argument or nullevent
- the Event to generate forCopyright © 2016. All rights reserved.