Version (Eclipse OpenMQ (tm), 5.1 API Specification)
Description: declaration: package: com.sun.messaging, class: Version

Package com.sun.messaging

# Class Version

java.lang.Object
com.sun.messaging.Version

public final class Version extends 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()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getImplementationVersion()`
  Returns the implementation version of the product example 3.6
  `static int[]`
  `getIntVersion(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 6
  `String`
  `getProductName()`
  Returns the product name example Eclipse OpenMQ(tm)
  `String`
  `getTargetJMSVersion()`
  Returns the JMS API version the product implements example 1.1
  `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.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### Version

    public Version()

- ## Method Details

  - ### 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 String getProductName()
    Returns the product name example Eclipse OpenMQ(tm)
    Returns:
      String representing the name of the product

  - ### getImplementationVersion

    public String getImplementationVersion()
    Returns the implementation version of the product example 3.6
    Returns:
      String representing the implementation version of the product

  - ### getTargetJMSVersion

    public 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 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(String str)
    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:
      `NumberFormatException`