Package com.sun.messaging
Class Version
- java.lang.Object
-
- com.sun.messaging.Version
-
public final class Version extends java.lang.Object
This class provides the Version information about the product. The information provided is only returning the version inofrmation for the client. It is quite possible that the broker may be running at a different version level. The version information such as Major release version , Minor release version service pack ,Product build date , JMS API version , Product name , Protocol version etc can be obtained through the various helper methods exposed by this class.
-
-
Constructor Summary
Constructors Constructor Description Version()
Constructor for this class
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getImplementationVersion()
Returns the implementation version of the product example 3.6static int[]
getIntVersion(java.lang.String str)
Returns the Version info in the form of an array of integer.int
getMajorVersion()
Returns the Major release of the Product version for example if the release value is 3.6.1 then the major version value will be 3.int
getMinorVersion()
Returns the Minor release of the Product version for example if the release value is 3.6.1 then the returned value of minor version will be 6java.lang.String
getProductName()
Returns the product name example Oracle GlassFish(tm) Server Message Queuejava.lang.String
getTargetJMSVersion()
Returns the JMS API version the product implements example 1.1java.lang.String
getVersion()
Returns the Version info of the product, this string is the concatanated value of pacakage name, API version, Protocol version, JMS API version, and the patch information.
-
-
-
Method Detail
-
getMajorVersion
public int getMajorVersion()
Returns the Major release of the Product version for example if the release value is 3.6.1 then the major version value will be 3.- Returns:
- an integer representing the major release version value if there is an exception returns -1
-
getMinorVersion
public int getMinorVersion()
Returns the Minor release of the Product version for example if the release value is 3.6.1 then the returned value of minor version will be 6- Returns:
- an integer representing the minor release version value if there is an exception returns -1
-
getProductName
public java.lang.String getProductName()
Returns the product name example Oracle GlassFish(tm) Server Message Queue- Returns:
- String representing the name of the product
-
getImplementationVersion
public java.lang.String getImplementationVersion()
Returns the implementation version of the product example 3.6- Returns:
- String representing the implementation version of the product
-
getTargetJMSVersion
public java.lang.String getTargetJMSVersion()
Returns the JMS API version the product implements example 1.1- Returns:
- String representing the JMS API version which the product is compliant to
-
getVersion
public java.lang.String getVersion()
Returns the Version info of the product, this string is the concatanated value of pacakage name, API version, Protocol version, JMS API version, and the patch information.- Returns:
- the String value of the product version info
-
getIntVersion
public static int[] getIntVersion(java.lang.String str) throws java.lang.NumberFormatException
Returns the Version info in the form of an array of integer. Parse a version string into four integers. The four integers represent the major product version , minor product version , micro product version and the service pack. This method handles both MQ service pack convetions (sp1) and JDK patch convention (_01). It also handles the JDK convetion of using a '-' to delimit a milestone string. In this case everything after the - is ignored. Examples: 3.0.1sp2 = 3 0 1 2 , 3.0.1 sp 2 = 3 0 1 2 , 3.5 sp 2 = 3 5 0 2 , 3.5.0.2 = 3 5 0 2 , 1.4.1_02 = 1 4 1 2 , 1.4_02 = 1.4 0 2 , 2 = 2 0 0 0 , 1.4.1-beta2 = 1 4 1 0- Parameters:
str
- String representing the product version- Returns:
- array of integers where int[0] = major Version int[1]=minor version int[3]=micro version int[4]= service pack
- Throws:
java.lang.NumberFormatException
-
-