Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.webchat
Class LicenseManager

java.lang.Object
  extended by com.jivesoftware.webchat.LicenseManager

public final class LicenseManager
extends java.lang.Object

Validates Jive license file. Non-static version of the Jive LicenseManager for container use. The license must be contained in the jive_messenger.license under the user's jiveHome/config directory.

See Also:
License

Field Summary
static java.lang.String VERSION_NUMBER
           
 
Constructor Summary
LicenseManager(java.io.File license)
          Only containers should be able to create license managers.
 
Method Summary
 License getLicense()
          Obtain the license for the server.
 int getNumClusterMembers()
          Returns the number of cluster members allowed.
 int getNumUsers()
          Returns the number of users allowed by this license.
static void main(java.lang.String[] args)
           
 void reloadLicenses()
          Explicitly reloads license file.
 void validateLicense(java.lang.String product, java.lang.String version)
          Checks to see if a license is valid for the specified product and version.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERSION_NUMBER

public static final java.lang.String VERSION_NUMBER
See Also:
Constant Field Values
Constructor Detail

LicenseManager

public LicenseManager(java.io.File license)
Only containers should be able to create license managers. I'm not sure how to enforce the pattern.

Parameters:
license - the license file to read.
Method Detail

main

public static void main(java.lang.String[] args)

getLicense

public License getLicense()

Obtain the license for the server.

Note that Messenger can run in workgroup mode with 10 free simultaneous users without a license. Such a license is created if one can't be found on the file system.

Returns:
The license for the server or null if none found

validateLicense

public void validateLicense(java.lang.String product,
                            java.lang.String version)
                     throws LicenseException
Checks to see if a license is valid for the specified product and version. If not, a LicenseException will be thrown.

Parameters:
product - the name of the product to check licensing on.
version - the version of the product to check licensing on.
Throws:
LicenseException - if not licensed for the specified product and version.

reloadLicenses

public void reloadLicenses()
Explicitly reloads license file. This is useful if the user has entered the license info through the setup tool, and we need to check if it's valid.


getNumUsers

public int getNumUsers()
Returns the number of users allowed by this license.

Returns:
The number of users allowed

getNumClusterMembers

public int getNumClusterMembers()
Returns the number of cluster members allowed. This number will be the lowest number allowed across all of the licenses installed.

Returns:
the number of cluster members allowed.

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.