public class ProcessingManagerImpl extends Object implements IProcessingManager
Default implementation of the processing manager interface
Modifier and Type | Field and Description |
---|---|
protected ModuleRegistry |
moduleRegistry |
Constructor and Description |
---|
ProcessingManagerImpl(ModuleRegistry moduleRegistry) |
Modifier and Type | Method and Description |
---|---|
Future<?> |
asyncExec(String processID,
int priority)
Executes the specified process in a separate thread with specified priority
(If too many processes are already running, process may actually be scheduled for later execution)
|
Collection<String> |
getAllProcessCodePackages() |
Collection<ModuleConfig> |
getAvailableModules()
Gets the list of all modules handled by this manager
that are configured but not yet loaded (i.e.
|
Collection<IProcessModule<?>> |
getLoadedModules()
Gets the list of all modules handled by this manager
that are already loaded (i.e.
|
IProcessModule<?> |
getModuleById(String moduleID)
Retrieves a module instance by its local ID
|
void |
installProcessCode(String processURI,
DocFlavor.URL codePackage,
boolean replace)
Installs a process code package (jar file) from the specified URL for the process URI
|
boolean |
isModuleLoaded(String moduleID) |
void |
syncExec(String processID)
Executes the specified process synchronously (method will block until processing is complete)
|
void |
uninstallProcessCode(String processURI)
Uninstalls process code with specified URI
|
protected ModuleRegistry moduleRegistry
public ProcessingManagerImpl(ModuleRegistry moduleRegistry)
public Collection<IProcessModule<?>> getLoadedModules()
IModuleManager
getLoadedModules
in interface IModuleManager<IProcessModule<?>>
public boolean isModuleLoaded(String moduleID)
isModuleLoaded
in interface IModuleManager<IProcessModule<?>>
moduleID
- local ID of modulepublic Collection<ModuleConfig> getAvailableModules()
IModuleManager
getAvailableModules
in interface IModuleManager<IProcessModule<?>>
public IProcessModule<?> getModuleById(String moduleID) throws SensorHubException
IModuleManager
getModuleById
in interface IModuleManager<IProcessModule<?>>
moduleID
- Id of module to retrieveSensorHubException
- if no module with given ID can be foundpublic Collection<String> getAllProcessCodePackages()
getAllProcessCodePackages
in interface IProcessingManager
public void installProcessCode(String processURI, DocFlavor.URL codePackage, boolean replace)
IProcessingManager
installProcessCode
in interface IProcessingManager
processURI
- URI of process type that this code should be used forcodePackage
- URL of jar containing classes necessary to run the specified methodreplace
- if true, old code associated to the same URI will be destroyedpublic void uninstallProcessCode(String processURI)
IProcessingManager
uninstallProcessCode
in interface IProcessingManager
public void syncExec(String processID)
IProcessingManager
syncExec
in interface IProcessingManager
public Future<?> asyncExec(String processID, int priority)
IProcessingManager
asyncExec
in interface IProcessingManager
Copyright © 2016 Sensia Software LLC. All rights reserved.