public class SMLStreamProcess extends AbstractStreamProcess<SMLStreamProcessConfig>
Implementation of process module fully configured using a SensorML process chain description. The SensorML execution engine is used to execute the different processing components used in the chain.
AbstractStreamProcess.InputData
DEFAULT_ID, errorCount, inputs, lastUpdatedSensorDescription, MAX_ERRORS, outputInterfaces, outputs, parameters, paused, processDescription, streamSources
config, eventHandler, lastError, logger, securityHandler, startRequested, state, stateLock, statusMsg
Constructor and Description |
---|
SMLStreamProcess() |
Modifier and Type | Method and Description |
---|---|
protected void |
connectInput(String inputName,
String dataPath,
DataQueue inputQueue) |
void |
init(SMLStreamProcessConfig config)
Initializes the module synchronously with the specified configuration.
Implementations of this method must block until the module is successfully initialized or send an exception. This is equivalent to calling IModule.setConfiguration(ModuleConfig)
and then IModule.init() with no arguments.Module lifecycle events may not be generated when calling this method directly. |
boolean |
isCompatibleDataSource(DataSourceConfig dataSource)
Checks that a given data source is acceptable for this process
|
boolean |
isPauseSupported()
Checks if this particular processing module supports pausing
|
protected void |
process(DataEvent lastEvent)
Method called everytime a new data event has been received on any input.
Concrete implementation must override this method to launch processing when appropriate (e.g. |
protected void |
scanIOList(OgcPropertyList<AbstractSWEIdentifiable> ioList,
Map<String,DataComponent> ioMap,
boolean isOutput) |
void |
start()
Starts the module synchronously with the current configuration.
Implementations of this method must block until the module is successfully started or send an exception. Module lifecycle events may not be generated when calling this method directly. init() should always be called before start(). |
void |
stop()
Stops the module.
All temporary resources created by the module should be cleaned when this is called (ex: memory, files, connections, etc.) Implementations of this method must block until the module is successfully stopped or send an exception. Module lifecycle events may not be generated when calling this method directly. stop() can be called right after init() even if start() hasn't been called. |
void |
updateConfig(SMLStreamProcessConfig config)
Updates the module's configuration dynamically.
The module must honor this new configuration unless an error is detected. |
addOutput, cleanup, getAllOutputs, getCurrentDescription, getCurrentFeatureOfInterest, getInputDescriptors, getLastDescriptionUpdate, getOutputDescriptors, getParameters, getUniqueIdentifier, handleEvent, pause, resume
canInit, canStart, canStop, clearError, clearStatus, getConfiguration, getCurrentError, getCurrentState, getLocalID, getLogger, getName, getStatusMessage, init, isInitialized, isStarted, loadState, notifyConnectionStatus, registerListener, reportError, reportError, reportStatus, requestInit, requestStart, requestStop, saveState, setConfiguration, setState, toString, unregisterListener, waitForState
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getConfiguration, getCurrentError, getCurrentState, getLocalID, getName, getStatusMessage, init, isInitialized, isStarted, loadState, registerListener, requestInit, requestStart, requestStop, saveState, setConfiguration, unregisterListener, waitForState
public void init(SMLStreamProcessConfig config) throws SensorHubException
IModule
IModule.setConfiguration(ModuleConfig)
and then IModule.init()
with no arguments.init
in interface IModule<SMLStreamProcessConfig>
init
in class AbstractModule<SMLStreamProcessConfig>
SensorHubException
public void updateConfig(SMLStreamProcessConfig config) throws SensorHubException
IModule
updateConfig
in interface IModule<SMLStreamProcessConfig>
updateConfig
in class AbstractModule<SMLStreamProcessConfig>
SensorHubException
protected void connectInput(String inputName, String dataPath, DataQueue inputQueue) throws Exception
connectInput
in class AbstractStreamProcess<SMLStreamProcessConfig>
Exception
protected void scanIOList(OgcPropertyList<AbstractSWEIdentifiable> ioList, Map<String,DataComponent> ioMap, boolean isOutput) throws ProcessException
ProcessException
public void start() throws SensorHubException
IModule
start
in interface IModule<SMLStreamProcessConfig>
start
in class AbstractStreamProcess<SMLStreamProcessConfig>
SensorHubException
public void stop()
IModule
stop
in interface IModule<SMLStreamProcessConfig>
stop
in class AbstractStreamProcess<SMLStreamProcessConfig>
public boolean isPauseSupported()
IStreamProcessModule
public boolean isCompatibleDataSource(DataSourceConfig dataSource)
IProcessModule
protected void process(DataEvent lastEvent) throws ProcessException
AbstractStreamProcess
process
in class AbstractStreamProcess<SMLStreamProcessConfig>
lastEvent
- data event triggering this callProcessException
Copyright © 2016 Sensia Software LLC. All rights reserved.