Class DeviceConfigServiceImpl
- java.lang.Object
-
- org.opennms.features.deviceconfig.service.impl.DeviceConfigServiceImpl
-
- All Implemented Interfaces:
DeviceConfigService
public class DeviceConfigServiceImpl extends Object implements DeviceConfigService
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.opennms.features.deviceconfig.service.DeviceConfigService
DeviceConfigService.RetrievalDefinition
-
-
Field Summary
-
Fields inherited from interface org.opennms.features.deviceconfig.service.DeviceConfigService
DEVICE_CONFIG_PREFIX
-
-
Constructor Summary
Constructors Constructor Description DeviceConfigServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompletableFuture<DeviceConfig>
getDeviceConfig(String ipAddress, String location, String service, boolean persist, int timeout)
Get device config for the given ipAddress at given location.PollerConfig
getPollerConfig()
List<DeviceConfigService.RetrievalDefinition>
getRetrievalDefinitions(String ipAddress, String location)
Gets the backup jobs defined for the given interface.void
setIpInterfaceDao(IpInterfaceDao ipInterfaceDao)
void
setLocationAwarePollerClient(LocationAwarePollerClient locationAwarePollerClient)
void
setServiceMonitorAdaptor(ServiceMonitorAdaptor serviceMonitorAdaptor)
void
setSessionUtils(SessionUtils sessionUtils)
CompletableFuture<Boolean>
triggerConfigBackup(String ipAddress, String location, String service, boolean persist)
Trigger device config backup for the given ipAddress at given location.
-
-
-
Method Detail
-
triggerConfigBackup
public CompletableFuture<Boolean> triggerConfigBackup(String ipAddress, String location, String service, boolean persist) throws IOException
Description copied from interface:DeviceConfigService
Trigger device config backup for the given ipAddress at given location.- Specified by:
triggerConfigBackup
in interfaceDeviceConfigService
- Parameters:
ipAddress
- specific IpAddress for which we need to fetch device config.location
- specific minion location at which we need to fetch device config.service
- name of the bound service.- Returns:
- Throws:
IOException
-
getDeviceConfig
public CompletableFuture<DeviceConfig> getDeviceConfig(String ipAddress, String location, String service, boolean persist, int timeout) throws IOException
Description copied from interface:DeviceConfigService
Get device config for the given ipAddress at given location.- Specified by:
getDeviceConfig
in interfaceDeviceConfigService
- Parameters:
ipAddress
- specific IpAddress for which we need to fetch device config.location
- specific minion location at which we need to fetch device config.service
- name of the bound service.timeout
- timeout in milliseconds for retrieving device config- Returns:
- Throws:
IOException
-
getRetrievalDefinitions
public List<DeviceConfigService.RetrievalDefinition> getRetrievalDefinitions(String ipAddress, String location)
Description copied from interface:DeviceConfigService
Gets the backup jobs defined for the given interface.- Specified by:
getRetrievalDefinitions
in interfaceDeviceConfigService
- Parameters:
ipAddress
- the IP address of the interface.location
- the location of the interface.- Returns:
- the
DeviceConfigService.RetrievalDefinition
s for this interface
-
setLocationAwarePollerClient
public void setLocationAwarePollerClient(LocationAwarePollerClient locationAwarePollerClient)
-
setSessionUtils
public void setSessionUtils(SessionUtils sessionUtils)
-
setIpInterfaceDao
public void setIpInterfaceDao(IpInterfaceDao ipInterfaceDao)
-
setServiceMonitorAdaptor
public void setServiceMonitorAdaptor(ServiceMonitorAdaptor serviceMonitorAdaptor)
-
getPollerConfig
public PollerConfig getPollerConfig() throws IOException
- Throws:
IOException
-
-