Package org.openmuc.framework.config
Interface ConfigService
-
public interface ConfigService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description RootConfiggetConfig()Returns a clone of the current configuration file.RootConfiggetConfig(ConfigChangeListener listener)DeviceStategetDeviceState(java.lang.String deviceId)DriverInfogetDriverInfo(java.lang.String driverId)RootConfiggetEmptyConfig()java.util.List<java.lang.String>getIdsOfRunningDrivers()voidinterruptDeviceScan(java.lang.String driverId)voidlock()voidreloadConfigFromFile()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)voidscanForDevices(java.lang.String driverId, java.lang.String settings, DeviceScanListener scanListener)voidsetConfig(RootConfig config)voidstopListeningForConfigChange(ConfigChangeListener listener)booleantryLock()voidunlock()voidwriteConfigToFile()
-
-
-
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
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.FileNotFoundExceptionParseException
-
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:
DriverNotAvailableExceptionjava.lang.UnsupportedOperationExceptionArgumentSyntaxExceptionScanExceptionScanInterruptedException
-
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:
DriverNotAvailableExceptionjava.lang.UnsupportedOperationException
-
scanForChannels
java.util.List<ChannelScanInfo> scanForChannels(java.lang.String deviceId, java.lang.String settings) throws DriverNotAvailableException, java.lang.UnsupportedOperationException, ArgumentSyntaxException, ScanException
- Throws:
DriverNotAvailableExceptionjava.lang.UnsupportedOperationExceptionArgumentSyntaxExceptionScanException
-
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)
-
-