ProducerType
- Type of producer handled by this providerpublic class StreamDataProviderFactory<ProducerType extends IDataProducerModule<?>> extends Object implements ISOSDataProviderFactory, IEventListener
Base factory for streaming data providers.
Modifier | Constructor and Description |
---|---|
protected |
StreamDataProviderFactory(SOSServlet service,
StreamDataProviderConfig config,
ProducerType producer,
String producerType) |
protected |
StreamDataProviderFactory(StreamDataProviderConfig config,
ProducerType producer,
String producerType) |
Modifier and Type | Method and Description |
---|---|
protected void |
checkEnabled() |
void |
cleanup()
Called when the provider is removed
|
SOSOfferingCapabilities |
generateCapabilities()
Builds the offering capabilities using the provider configuration
This will connect to source providers to retrieve the necessary metadata
|
AbstractProcess |
generateSensorMLDescription(double time)
Retrieves the SensorML description associated to this data source
|
StreamDataProviderConfig |
getConfig() |
Iterator<AbstractFeature> |
getFoiIterator(IFoiFilter filter)
Retrieves iterator among features of interest matching the filter
|
protected double |
getLowestSamplingPeriodFromProducer() |
ISOSDataProvider |
getNewDataProvider(SOSDataFilter filter)
Instantiates a new data provider
|
protected Set<String> |
getObservablePropertiesFromProducer() |
protected Set<String> |
getObservationTypesFromProducer() |
protected long |
getTimeSinceLastRecord() |
void |
handleEvent(Event<?> e) |
boolean |
isEnabled()
Allows to check if provider is enabled
|
void |
updateCapabilities()
Update capabilities previously generated by this provider if needed.
|
protected void |
updateNameAndDescription() |
protected StreamDataProviderFactory(SOSServlet service, StreamDataProviderConfig config, ProducerType producer, String producerType) throws SensorHubException
SensorHubException
protected StreamDataProviderFactory(StreamDataProviderConfig config, ProducerType producer, String producerType) throws SensorHubException
SensorHubException
public SOSOfferingCapabilities generateCapabilities() throws ServiceException
ISOSDataProviderFactory
generateCapabilities
in interface ISOSDataProviderFactory
ServiceException
protected void updateNameAndDescription()
public void updateCapabilities() throws Exception
ISOSDataProviderFactory
ISOSDataProviderFactory.generateCapabilities()
updateCapabilities
in interface ISOSDataProviderFactory
Exception
protected long getTimeSinceLastRecord()
protected Set<String> getObservablePropertiesFromProducer() throws SensorHubException
SensorHubException
protected Set<String> getObservationTypesFromProducer() throws SensorHubException
SensorHubException
protected double getLowestSamplingPeriodFromProducer() throws SensorHubException
SensorHubException
public AbstractProcess generateSensorMLDescription(double time) throws ServiceException
ISOSDataProviderFactory
generateSensorMLDescription
in interface ISOSDataProviderFactory
time
- Time at which the description should be validServiceException
public Iterator<AbstractFeature> getFoiIterator(IFoiFilter filter) throws Exception
ISOSDataProviderFactory
getFoiIterator
in interface ISOSDataProviderFactory
filter
- feature filtering criteriasException
protected void checkEnabled() throws ServiceException
ServiceException
public void handleEvent(Event<?> e)
handleEvent
in interface IEventListener
public void cleanup()
ISOSDataProviderFactory
cleanup
in interface ISOSDataProviderFactory
public boolean isEnabled()
ISOSDataProviderFactory
isEnabled
in interface ISOSDataProviderFactory
public StreamDataProviderConfig getConfig()
getConfig
in interface ISOSDataProviderFactory
public ISOSDataProvider getNewDataProvider(SOSDataFilter filter) throws Exception
ISOSDataProviderFactory
getNewDataProvider
in interface ISOSDataProviderFactory
Exception
Copyright © 2016 Sensia Software LLC. All rights reserved.