Overview | Package | Class | Tree | Deprecated | Index | Help
| Sun GlassFish(tm) Message Queue v4.4
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sun.messaging
Class Version

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

    public 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.

Field Summary
`static int` | `LONG_COPYRIGHT` Deprecated.
`static int` | `MINI_COPYRIGHT` Deprecated.
`static int` | `SHORT_COPYRIGHT` Deprecated.

Constructor Summary
`Version()` Constructor for this class

Method Summary
`static int` | `compareVersions(int[] s1, int[] s2)` Deprecated.
`static int` | `compareVersions(String stra, String strb)` Deprecated.
`static int` | `compareVersions(String verA, String verB, boolean ignoreServicePack)` Deprecated.
`String` | `getAbbreviatedProductName()` Deprecated.
`String` | `getBanner(boolean alldata)` Deprecated.
`String` | `getBanner(boolean alldata, int copyrightType)` Deprecated.
`String` | `getBuildDate()` Deprecated.
`String` | `getBuildMilestone()` Deprecated.
`String` | `getBuildVersion()` Deprecated.
`String` | `getCopyright(int copyrightType)` Deprecated.
`String` | `getHeader()` Deprecated.
`String` | `getHeader(int copyrightType)` Deprecated.
`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.
`String` | `getJMSAdminSpiVersion()` Deprecated.
`String` | `getLowerCaseAbbreviatedProductName()` Deprecated.
`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[]` | `getPatchIds()` Deprecated.
`String` | `getPatchString()` Deprecated.
`String` | `getProductCompanyName()` Deprecated.
`String` | `getProductCopyrightDate()` Deprecated.
`String` | `getProductName()` Returns the product name example Sun GlassFish(tm) Message Queue
`String` | `getProductVersion()` Deprecated.
`Properties` | `getProps()` Deprecated.
`String` | `getProtocolVersion()` Deprecated.
`String` | `getReleaseQID()` Deprecated.
`String` | `getShortProductName()` Deprecated.
`String` | `getTargetJMSVersion()` Returns the JMS API version the product implements example 1.1
`String` | `getUserAgent()` Deprecated.
`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.
`String` | `getVersionPackageName()` Deprecated.
`String` | `getVersionProperty(String name)` Deprecated.
`static void` | `main(String[] args)` Deprecated.
`String` | `toString()` Deprecated.
`static String` | `toVersionString(int[] ver)` Deprecated.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### MINI_COPYRIGHT

    public static final int MINI_COPYRIGHT

  Deprecated.
  Represents the mini copyright value for the product

  See Also:
    Constant Field Values

### SHORT_COPYRIGHT

    public static final int SHORT_COPYRIGHT

  Deprecated.
  Represents the short copyright value for the product

  See Also:
    Constant Field Values

### LONG_COPYRIGHT

    public static final int LONG_COPYRIGHT

  Deprecated.
  Represents the long copyright value for the product

  See Also:
    Constant Field Values

Constructor Detail

### Version

    public Version()

  Constructor for this class

Method Detail

### getProps

    public Properties getProps()

  Deprecated.

  Returns the properties object that holds the various version properties and their values. This is a private method , not for general use.This method may be removed in the future release without further warning

  Returns:
    Properties object holding the name value pair of the version property name and it's corresponding values

### getProductVersion

    public String getProductVersion()

  Deprecated.

  Returns the product version as a string The returned string has the information about the major release, minor release and service packs if any example 3.6 SP1 This is a private method , not for general use.This method may be removed in the future release without further warning

  Returns:
    String representing the product version

### 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

### getVersionProperty

    public String getVersionProperty(String name)

  Deprecated.

  Returns the value of the particular version property for example if the requested property is 'imq.product.version' the returned value will be 3.6 This is a private method , not for general use.This method may be removed in the future release without further warning

  Parameters:
    `name` - String representing the name of the property whose value is desired
  Returns:
    String representing the value of the desired property

### getBuildMilestone

    public String getBuildMilestone()

  Deprecated.

  Returns the Build Mile Stone value of the product being used for example 'Beta' This is a private method , not for general use.This method may be removed in the future release without further warning

  Returns:
    String representing the Milestone Build value of the product

### getBuildDate

    public String getBuildDate()

  Deprecated.

  Returns the Build date value of the product in the following format 'Day Month Date Time Year' example Mon June 1 09:03:29 IST 2004 This is a private method , not for general use.This method may be removed in the future release without further warning

  Returns:
    String representing the date of the build of the product being used

### getBuildVersion

    public String getBuildVersion()

  Deprecated.

  Returns the Build version value of the product The returned string is the concatnated value of the product version,build number and promoted build. This is a private method , not for general use.This method may be removed in the future release without further warning

  Returns:
    String representing the Build Version of the product being used

### getProductName

    public String getProductName()

  Returns the product name example Sun GlassFish(tm) Message Queue

  Returns:
    String representing the name of the product

### getReleaseQID

    public String getReleaseQID()

  Deprecated.

  Returns the product release

  Returns:
    String representing version (no longer returns release quarter)

### getAbbreviatedProductName

    public String getAbbreviatedProductName()

  Deprecated.

  Returns the abbreviated name of the product, for example "MQ". This is a private method , not for general use.This method may be removed in the future release without further warning

  Returns:
    String representing the abbreviated name of the product

### getLowerCaseAbbreviatedProductName

    public String getLowerCaseAbbreviatedProductName()

  Deprecated.

  Returns the lower case of the abbreviated name of the product, for example "mq". This is a private method , not for general use.This method may be removed in the future release without further warning

  Returns:
    String representing the abbreviated name of the product

### getShortProductName

    public String getShortProductName()

  Deprecated.

  Returns the short name of the product, for example "Message Queue". This is a private method , not for general use.This method may be removed in the future release without further warning

  Returns:
    String representing the short name of the product

### getProductCopyrightDate

    public String getProductCopyrightDate()

  Deprecated.

  Returns the copyright date of the product example copyright 2004 This is a private method , not for general use.This method may be removed in the future release without further warning

  Returns:
    String representing the copyright date of the product

### getProductCompanyName

    public String getProductCompanyName()

  Deprecated.

  Returns the product company's name example Sun Microsystems Inc This is a private method , not for general use.This method may be removed in the future release without further warning

  Returns:
    String representing the Product Company's name

### getVersionPackageName

    public String getVersionPackageName()

  Deprecated.

  Returns the implementation package name of the product example (com.sun.messaging) This is a private method , not for general use.This method may be removed in the future release without further warning

  Returns:
    String representing the pacakge name

### getImplementationVersion

    public String getImplementationVersion()

  Returns the implementation version of the product example 3.6

  Returns:
    String representing the implementation version of the product

### getProtocolVersion

    public String getProtocolVersion()

  Deprecated.

  Returns the protocol version of the product. There is a properitory protocol used to communicate with the broker and amongst the brokers.This value will tell which version is currently being used. If there are no change's then the previous value will be carried forward and retuned. example 3.6 This is a private method , not for general use.This method may be removed in the future release without further warning

  Returns:
    String representing the protocol 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

### getUserAgent

    public String getUserAgent()

  Deprecated.

  Returns the User Agent value of the product. This is the concatnated string having values of Productversion, Operating System on which the product runs, the version of the operating system and the operating system architecture example : SJSMQ/3.6 (JMS; SunOS 5.9 sun4u) This is a private method , not for general use.This method may be removed in the future release without further warning

  Returns:
    the String representing the value of the UserAgent

### toString

    public String toString()

  Deprecated.

  Returns the banner for the product. The banner comprises of the Product name,Company name Product version, Build value, Build Date, Copyright value in a formatted manner This is a private method , not for general use.This method may be removed in the future release without further warning

  Overrides:
    `toString` in class `Object`
  Returns:
    String representing the banner

### getHeader

    public String getHeader()

  Deprecated.

  Returns the header value for the banner being used for the product This header value will be for the SHORT_COPYRIGHT value by default. This is a private method , not for general use.This method may be removed in the future release without further warning

  Returns:
    a string reperesenting the header details

### getHeader

    public String getHeader(int copyrightType)

  Deprecated.

  Returns the header for the given copyright This is a private method , not for general use.This method may be removed in the future release without further warning

  Parameters:
    `copyrightType` - an integer value of the valid copyright type MINI_COPYRIGHT, SHORT_COPYRIGHT, LONG_COPYRIGHT
  Returns:
    String value of the header

### getCopyright

    public String getCopyright(int copyrightType)

  Deprecated.

  Returns the copyright value for the desired copyright type passed as an argument This is a private method , not for general use.This method may be removed in the future release without further warning

  Parameters:
    `copyrightType` - an integer value of the copyright type valid values are MINI_COPYRIGHT, SHORT_COPYRIGHT, LONG_COPYRIGHT
  Returns:
    String value of the copyright

### getPatchIds

    public String[] getPatchIds()

  Deprecated.

  Returns patch ID's for the product which will be an array of String comprising of all the patches for this product. Each entry will be in the following format 'Major version.Minor Version_patchid number' Can be used to format the patchids in your own app. This is a private method , not for general use.This method may be removed in the future release without further warning

  Returns:
    array of String comprising the patchid's

### getPatchString

    public String getPatchString()

  Deprecated.

  Returns the patch string in the format: Installed Patch ID(s): 111111-01 222222-01 NNNNNN-NN This is a private method , not for general use.This method may be removed in the future release without further warning

  Returns:
    a string representing all the patches for the product.

### getJMSAdminSpiVersion

    public String getJMSAdminSpiVersion()

  Deprecated.

  Returns the JMSAdmin SPI version value of the product. This is the Admin SPI implementation value. The value is not the same as the Product API implementation or the JMS API version. example 2.0 This is a private method , not for general use.This method may be removed in the future release without further warning

  Returns:
    String value of the JMSAdmin SPI version

### 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

### getBanner

    public String getBanner(boolean alldata)

  Deprecated.

  Returns the banner details for the default copyright type: SHORT_COPYRIGHT This is a private method , not for general use.This method may be removed in the future release without further warning

  Parameters:
    `alldata` - a boolean value indicating that is it desired to get a detailed info
  Returns:
    a String representing the banner

### getBanner

    public String getBanner(boolean alldata,
                            int copyrightType)

  Deprecated.

  Returns the banner details for a given copyright type. This is a private method , not for general use.This method may be removed in the future release without further warning

  Parameters:
    `alldata` - a boolean value indicating whether you want a detailed info(true) or not(false)
    `copyrightType` - an integer representing the copyright for which the banner detail is required valid values are SHORT_COPYRIGHT, MINI_COPYRIGHT, LONG_COPYRIGHT
  Returns:
    the string representing the banner

### getIntVersion

    public static int[] getIntVersion(String str)
                               throws 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:
    `NumberFormatException`

### compareVersions

    public static int compareVersions(String stra,
                                      String strb)

  Deprecated.

  Returns the comparison result of the two versions of the product passed as argument assuming service packs have no incompatibilities This is a private method , not for general use.This method may be removed in the future release without further warning

  Parameters:
    `stra` - representing the version which need to be compared
    `strb` - representing the second version string that needs to be compared.
  Returns:
    -1 If stra is less than strB 0 If stra is equal to strb 1 If stra is greater than strbB

### compareVersions

    public static int compareVersions(String verA,
                                      String verB,
                                      boolean ignoreServicePack)
                               throws NumberFormatException

  Deprecated.

  Returns the Comparison results of the two product versions. This is a private method , not for general use.This method may be removed in the future release without further warning

  Parameters:
    `verA` - First version string
    `verB` - Second version string
    `ignoreServicePack` - true to ignore the service pack or patch level
  Returns:
    -1 If verA is less than verB 0 If verA is equal to verB 1 If verA is greater than verB
  Throws:
    `NumberFormatException`

### compareVersions

    public static int compareVersions(int[] s1,
                                      int[] s2)

  Deprecated.

  Compares the two versions which are in the form of array,s. The array encapsulate's the major,minor,micro and service pack details of each version string. This is a private method , not for general use.This method may be removed in the future release without further warning

  Parameters:
    `s1` - the first array of integer representing the versin info
    `s2` - the second array of interger representing the version info that has to be compared
  Returns:
    -1 If s1 is less than s2 0 If s1 is equal to s2 1 If s1 is greater than s2

### toVersionString

    public static String toVersionString(int[] ver)

  Deprecated.

  Returns the Version String value of the version info passed as an array of integer This is a private method , not for general use.This method may be removed in the future release without further warning

  Parameters:
    `ver` - an array of integer reperesenting the version info int[0]=major int[1]=minor int[2]=micro int[3]=service pack
  Returns:
    a String value of the data passed in the integer array

### main

    public static void main(String[] args)

  Deprecated.

  This method makes the class executable. When the class is executed the product banner will be printed providing information comprising of product version , product name , organization name build details and the short copyright info. This is a private method , not for general use.This method may be removed in the future release without further warning

Overview | Package | Class | Tree | Deprecated | Index | Help
| Sun GlassFish(tm) Message Queue v4.4
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 2009 Sun Microsystems, Inc. 4150 Network Circle,
Santa Clara, California, 95054, U.S.A. All Rights Reserved.