Package org.apache.nifi.remote
Interface VersionNegotiator
- All Known Implementing Classes:
StandardVersionNegotiator
public interface VersionNegotiator
-
Method Summary
Modifier and TypeMethodDescriptionint
getPreferredVersion
(int maxVersion) Gets the preferred version of this resource that is no greater than the given maxVersion.int
boolean
isVersionSupported
(int version) Indicates whether or not the specified version is supported by this resourcevoid
setVersion
(int version) Sets the version of this resource to the specified version.
-
Method Details
-
getVersion
int getVersion()- Returns:
- the currently configured Version of this resource
-
setVersion
Sets the version of this resource to the specified version. Only the lower byte of the version is relevant.- Parameters:
version
- the version to set- Throws:
IllegalArgumentException
- if the given Version is not supported by this resource, as is indicated by theisVersionSupported(int)
method
-
getPreferredVersion
int getPreferredVersion()- Returns:
- the Version of this resource that is preferred
-
getPreferredVersion
Gets the preferred version of this resource that is no greater than the given maxVersion. If no acceptable version exists that is less thanmaxVersion
, thennull
is returned- Parameters:
maxVersion
- the maximum version desired- Returns:
- the preferred version if found; null otherwise
-
isVersionSupported
boolean isVersionSupported(int version) Indicates whether or not the specified version is supported by this resource- Parameters:
version
- the version to test- Returns:
- true if supported; false otherwise
-
getSupportedVersions
-