Package de.aristaflow.adept2.util
Class RequiredJavaVersion
- java.lang.Object
-
- de.aristaflow.adept2.util.RequiredJavaVersion
-
public final class RequiredJavaVersion extends Object
Provides check methods whether the current JVM meets the requirements to run the AristaFlow applications.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description protected static Pair<Boolean,String>
checkJava(String preformattedFailMsg, String preformattedWarnMsg, String preformattedFcsMsg, String productName)
Checks for whether the product with the current JVM is the right JVM version for the designated product.static Pair<Boolean,String>
checkJavaMessage(String preformattedFailMsg, String preformattedWarnMsg)
Checks for whether the product with the current JVM is the right JVM version for the designated product.static Pair<Boolean,String>
checkJavaMessage(String preformattedFailMsg, String preformattedWarnMsg, String preformattedFcsMsg)
Checks for whether the product with the current JVM is the right JVM version for the designated product.static Pair<Boolean,String>
checkJavaProduct(String productName)
Checks for whether the product with the current JVM is the right JVM version for the designated product.
-
-
-
Method Detail
-
checkJavaProduct
public static Pair<Boolean,String> checkJavaProduct(String productName)
Checks for whether the product with the current JVM is the right JVM version for the designated product. If this is not the case, a message based on the designated product name will be returned together with aBoolean
indicating how to use the message.Use the return value as follows:
null
: Everything is fine, ignore the message (which will be alsonull
.false
: The current Java is unknown, the message could be used as warning.true
: The current Java is known and does not meet the requirements, use the message to abort/fail.
- Parameters:
productName
- The name of the product for which the JVM version is checked.- Returns:
- A pair of a Boolean indicating how to use the message string
providing information on the required java version. If the current
JVM version is appropriate and known, the Boolean will be
null
, if the current JVM version is unknown the Boolean will befalse
and if the current JVM is known to be inappropriate the Boolean will betrue
.
-
checkJavaMessage
public static Pair<Boolean,String> checkJavaMessage(String preformattedFailMsg, String preformattedWarnMsg)
Checks for whether the product with the current JVM is the right JVM version for the designated product. If this is not the case, a message based on the designated preformatted message will be filled with the appropriate information and returned together with aBoolean
indicating how to use the message.Use the return value as follows:
null
: Everything is fine, ignore the message (which will be alsonull
.false
: The current Java is unknown, the message could be used as warning.true
: The current Java is known and does not meet the requirements, use the message to abort/fail.
- Parameters:
preformattedFailMsg
- The preformatted fail message used for the created message in case the current JVM version is not appropriate. The designated message can contain arguments for the company name (%1$s), the minimum version (%2$) and the current version (%3$s).preformattedWarnMsg
- The preformatted warning message used for the created message in case the current JVM version is unknown. The designated message can contain arguments for the company name (%1$s) and the current version (%2$s).- Returns:
- A pair of a Boolean indicating how to use the message string
providing information on the required java version. If the current
JVM version is appropriate and known, the Boolean will be
null
, if the current JVM version is unknown the Boolean will befalse
and if the current JVM is known to be inappropriate the Boolean will betrue
.
-
checkJavaMessage
public static Pair<Boolean,String> checkJavaMessage(String preformattedFailMsg, String preformattedWarnMsg, String preformattedFcsMsg)
Checks for whether the product with the current JVM is the right JVM version for the designated product. If this is not the case, a message based on the designated preformatted message will be filled with the appropriate information and returned together with aBoolean
indicating how to use the message.Use the return value as follows:
null
: Everything is fine, ignore the message (which will be alsonull
.false
: The current Java is unknown, the message could be used as warning.true
: The current Java is known and does not meet the requirements, use the message to abort/fail.
- Parameters:
preformattedFailMsg
- The preformatted fail message used for the created message in case the current JVM version is not appropriate. The designated message can contain arguments for the company name (%1$s), the minimum version (%2$) and the current version (%3$s).preformattedWarnMsg
- The preformatted warning message used for the created message in case the current JVM version is unknown. The designated message can contain arguments for the company name (%1$s) and the current version (%2$s).preformattedFcsMsg
- The preformatted warning message used for the created message in case the current JVM version is a known JVM in a non-FCS variant. The designated message can contain arguments for the company name (%1$s) and the current version (%2$s).- Returns:
- A pair of a Boolean indicating how to use the message string
providing information on the required java version. If the current
JVM version is appropriate and known, the Boolean will be
null
, if the current JVM version is unknown the Boolean will befalse
and if the current JVM is known to be inappropriate the Boolean will betrue
.
-
checkJava
protected static Pair<Boolean,String> checkJava(String preformattedFailMsg, String preformattedWarnMsg, String preformattedFcsMsg, String productName)
Checks for whether the product with the current JVM is the right JVM version for the designated product. If this is not the case, a message based on the designated preformatted message or the designated product name will be filled with the appropriate information and returned together with aBoolean
indicating how to use the message.Use the return value as follows:
null
: Everything is fine, ignore the message (which will be alsonull
.false
: The current Java is unknown, the message could be used as warning.true
: The current Java is known and does not meet the requirements, use the message to abort/fail.
- Parameters:
preformattedFailMsg
- The preformatted fail message used for the created message in case the current JVM version is not appropriate. The designated message can contain arguments for the company name (%1$s), the minimum version (%2$) and the current version (%3$s). If this isnull
a default message will be used.preformattedWarnMsg
- The preformatted warning message used for the created message in case the current JVM version is unknown or a non-FCS. The designated message can contain arguments for the company name (%1$s) and the current version (%2$s).preformattedFcsMsg
- The preformatted warning message used for the created message in case the current JVM version is a known JVM in a non-FCS variant. The designated message can contain arguments for the company name (%1$s) and the current version (%2$s).productName
- The name of the product for which the JVM version is checked. This should only benull
in case the preformatted message is notnull
.- Returns:
- A pair of a Boolean indicating how to use the message string
providing information on the required java version. If the current
JVM version is appropriate and known, the Boolean will be
null
, if the current JVM version is unknown the Boolean will befalse
and if the current JVM is known to be inappropriate the Boolean will betrue
.
-
-