Interface IConfiguration
- All Known Subinterfaces:
IWinConfiguration
public interface IConfiguration
This interface represents the generic configuration that's used and implemented by various protocol configurations like
HttpConfiguration, IpmiConfiguration, etc ...
-
Method Summary
Modifier and TypeMethodDescriptioncopy()Creates and returns a deep copy of the currentIConfigurationinstance.Retrieves the declared hostname of the IConfiguration.voidsetHostname(String hostname) Replaces the IConfiguration's hostname value by the hostname parameter's value.voidvalidateConfiguration(String resourceKey) Validates the current configuration for the given configured resource key.
-
Method Details
-
getHostname
String getHostname()Retrieves the declared hostname of the IConfiguration.- Returns:
- the IConfiguration hostname value.
-
setHostname
Replaces the IConfiguration's hostname value by the hostname parameter's value.- Parameters:
hostname- the hostname of the local or remote device.
-
validateConfiguration
Validates the current configuration for the given configured resource key. This method ensures that the configuration meets all required criteria. Criteria may include checking for necessary fields, verifying values against allowed ranges or formats, and ensuring compatibility with the resource's requirements.- Parameters:
resourceKey- AStringrepresenting the unique identifier for the resource used for logging purpose.- Throws:
InvalidConfigurationException- if the provided configuration does not meet the necessary criteria.
-
copy
IConfiguration copy()Creates and returns a deep copy of the currentIConfigurationinstance. The returned instance will have the same attribute values as the original, but modifications to either instance will not affect the other.- Returns:
- a new
IConfigurationinstance that is a deep copy of the original.
-