public final class VersionVerifier extends Object
Utility class to verify the client version. When specifying the allowed versions, clients may either specify an array containing all allowed version numbers or specify a single wildcard version.
A wildcard version is specified via the '*' letter. All other letters known from regular expressions are not considered.
For instance the wildcard version 1.2.3.x would accept all 1.2.3 versions independently of the actual qualifier where
x stand for a qualifier. Multiple wildcard versions are not allowed
| Modifier and Type | Method and Description |
|---|---|
static void |
verify(String[] versions,
ClientVersionInfo clientVersionInfo)
Verifies the client version against a set of allowed versions.
|
public static void verify(String[] versions, ClientVersionInfo clientVersionInfo) throws ClientVersionOutOfDateException
versions - the list of accepted versions or a single wildcard version like '1.2.3.*'clientVersionInfo - the client version to verifyClientVersionOutOfDateException - in case the client version is out of dateCopyright © 2017. All rights reserved.