Package org.openmuc.framework.config
Interface ConfigService
-
public interface ConfigService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description RootConfig
getConfig()
Returns a clone of the current configuration file.RootConfig
getConfig(ConfigChangeListener listener)
DeviceState
getDeviceState(java.lang.String deviceId)
DriverInfo
getDriverInfo(java.lang.String driverId)
RootConfig
getEmptyConfig()
java.util.List<java.lang.String>
getIdsOfRunningDrivers()
void
interruptDeviceScan(java.lang.String driverId)
void
lock()
void
reloadConfigFromFile()
java.util.List<ChannelScanInfo>
scanForChannels(java.lang.String deviceId, java.lang.String settings)
java.util.List<DeviceScanInfo>
scanForDevices(java.lang.String driverId, java.lang.String settings)
void
scanForDevices(java.lang.String driverId, java.lang.String settings, DeviceScanListener scanListener)
void
setConfig(RootConfig config)
void
stopListeningForConfigChange(ConfigChangeListener listener)
boolean
tryLock()
void
unlock()
void
writeConfigToFile()
-
-
-
Method Detail
-
lock
void lock()
-
tryLock
boolean tryLock()
-
unlock
void unlock()
-
getConfig
RootConfig getConfig()
Returns a clone of the current configuration file.- Returns:
- clone of the configuration file.
- See Also:
setConfig(RootConfig)
-
getConfig
RootConfig getConfig(ConfigChangeListener listener)
-
stopListeningForConfigChange
void stopListeningForConfigChange(ConfigChangeListener listener)
-
setConfig
void setConfig(RootConfig config)
-
writeConfigToFile
void writeConfigToFile() throws ConfigWriteException
- Throws:
ConfigWriteException
-
reloadConfigFromFile
void reloadConfigFromFile() throws java.io.FileNotFoundException, ParseException
- Throws:
java.io.FileNotFoundException
ParseException
-
getEmptyConfig
RootConfig getEmptyConfig()
-
scanForDevices
java.util.List<DeviceScanInfo> scanForDevices(java.lang.String driverId, java.lang.String settings) throws DriverNotAvailableException, java.lang.UnsupportedOperationException, ArgumentSyntaxException, ScanException, ScanInterruptedException
- Throws:
DriverNotAvailableException
java.lang.UnsupportedOperationException
ArgumentSyntaxException
ScanException
ScanInterruptedException
-
scanForDevices
void scanForDevices(java.lang.String driverId, java.lang.String settings, DeviceScanListener scanListener) throws DriverNotAvailableException
- Throws:
DriverNotAvailableException
-
interruptDeviceScan
void interruptDeviceScan(java.lang.String driverId) throws DriverNotAvailableException, java.lang.UnsupportedOperationException
- Throws:
DriverNotAvailableException
java.lang.UnsupportedOperationException
-
scanForChannels
java.util.List<ChannelScanInfo> scanForChannels(java.lang.String deviceId, java.lang.String settings) throws DriverNotAvailableException, java.lang.UnsupportedOperationException, ArgumentSyntaxException, ScanException
- Throws:
DriverNotAvailableException
java.lang.UnsupportedOperationException
ArgumentSyntaxException
ScanException
-
getDriverInfo
DriverInfo getDriverInfo(java.lang.String driverId) throws DriverNotAvailableException
- Throws:
DriverNotAvailableException
-
getIdsOfRunningDrivers
java.util.List<java.lang.String> getIdsOfRunningDrivers()
-
getDeviceState
DeviceState getDeviceState(java.lang.String deviceId)
-
-