Previous section.

Systems Management: Software License Use Management (XSLM)
Copyright © 1999 The Open Group

Java Bindings for Application Program API

This appendix contains the description of the standard Java bindings for the APIs (both basic and advanced) of the application programs for the License Use Management (XSLM) Technical Standard.

package org.opengroup.xslm

Interface Index

AdvancedApplicationClient

BasicApplicationClient

XSLMConstants

Class Index

LicenseAgent

LicenseBroker

LicenseUseManagement

Publisher

Session

Exception Index

CommunicationException

InvalidParameterException

LicenseCertificateException

LicenseClientException

NoSuchAPILevelException

NoSuchPublisherException

ResourceUnavailableException


Interface org.opengroup.xslm.AdvancedApplicationClient

public interface AdvancedApplicationClient The AdvancedApplicationClient interface is the interface for the first functional tower of the XSLM specification the Advanced XAAPI.
See Also:
BasicApplicationClient, LicenseAgent, LicenseBroker

Method Index

confirm(long, int)
Confirms that a license is currently in use.
getAuthenticationSignature()
Returns the digital signature created by the licensing system from the input and output parameters and the authorization token.
logMessage(String, int)
Logs an application-specified text message into license system's log
queryAPILevel()
Returns the maximum API specification level supported by all license servers in the licensing system.
queryCertificateInfo(int, int)
Returns various types of license certificate information.
queryFunctionalTowers()
Returns an array of functional tower identifiers supported by all license servers in the licensing system.
record(long, float, int)
Informs the license system about a metering activity in progress
releaseLicense(long, int)
Releases some or all license units associated with this instance of the license client
requestLicense(PublicKey, long, boolean, int)
Requests the license system for specified number of license units
requestLicense(PublicKey, long, int)
Requests the license system for default number of units licenses (as specified within a license certificate).
requestLicense(PublicKey, String, int)
Requests the license system to grant default number of units licenses to the specified user.
requestLicense(PublicKey, String, long, long, boolean, int)
Requests the license system for specified number of units licenses

Methods

  • confirm

    public abstract void confirm(long confirmTime,
                                 int authenticationToken) 
     throws CommunicationException, InvalidParameterException, 
     LicenseCertificateException, LicenseClientException,
     ResourceUnavailableException
    Confirms that a license is currently in use. Should the license system not receive any confirm from the application client within the default time period specified in the certificate, the license is no longer in use and will return it to the pool of free, available licenses.
    Parameters:
    confirmTime - elapsed time (in seconds) whithin which the liscense system may expect the next confirm.
    authenticationToken - a 32-bit arbitrary value created by the application and used as part of the licensing system authentication process
    Throws: CommunicationException
    if a communication error occurs between the license client and the license server
    Throws: InvalidParameterException
    if a parameter passed to a method is invalid
    Throws: LicenseCertificateException
    if the requested method cannot be completed on any license crtificate
    Throws: LicenseClientException
    if a generic license client error occurs
    Throws: ResourceUnavailableException
    if a resource required to execute the requested method is not available

  • getAuthenticationSignature

    public abstract byte[] getAuthenticationSignature() 
     throws LicenseClientException
    Returns the digital signature created by the licensing system from the input and output parameters and the authorization token.
    Returns:
    the digital signature created by the licensing system.
    Throws: LicenseClientException
    if a generic license client error occurs

  • logMessage

    public abstract void logMessage(String message,
                                    int authenticationToken) 
     throws CommunicationException, InvalidParameterException, 
     LicenseCertificateException, LicenseClientException, 
     ResourceUnavailableException
    Logs an application-specified text message into license system's log
    Parameters:
    message - the text string of the message, it can be of any length; however, a licensing system is not required to accept more than 4096 bytes.
    authenticationToken - a 32-bit arbitrary value created by the application and used as part of the licensing system authentication process
    Throws: CommunicationException
    if a communication error occurs between the license client and the license server
    Throws: InvalidParameterException
    if a parameter passed to a method is invalid
    Throws: LicenseCertificateException
    if the requested method cannot be completed on any license crtificate
    Throws: LicenseClientException
    if a generic license client error occurs
    Throws: ResourceUnavailableException
    if a resource required to execute the requested method is not available

  • queryAPILevel

    public abstract long queryAPILevel() 
     throws CommunicationException, LicenseClientException, 
     ResourceUnavailableException
    Returns the maximum API specification level supported by all license servers in the licensing system.
    Returns:
    the maximum API specification level supported by all license servers in the licensing system
    Throws: CommunicationException
    if a communication error occurs between the license client and the license server
    Throws: LicenseClientException
    if a generic license client error occurs
    Throws: ResourceUnavailableException
    if a resource required to execute the requested method is not available

  • queryFunctionalTowers

    public abstract long[] queryFunctionalTowers() 
     throws CommunicationException, LicenseClientException, 
     ResourceUnavailableException
    Returns an array of functional tower identifiers supported by all license servers in the licensing system.
    Returns:
    an array of functional tower identifiers supported by all license servers in the licensing system
    Throws: CommunicationException
    if a communication error occurs between the license client and the license server
    Throws: LicenseClientException
    if a generic license client error occurs
    Throws: ResourceUnavailableException
    if a resource required to execute the requested method is not available

  • queryCertificateInfo

     public abstract byte[] queryCertificateInfo(int queryType, 
                                                 int authenticationToken)
     throws CommunicationException, LicenseCertificateException,
     LicenseClientException, ResourceUnavailableException
    Returns the various types of license certificate information associated with this license client object
    Parameters:
    queryType - a value which identifies the information to be returned
    authenticationToken - a 32-bit arbitrary value created by the application and used as part of the licensing system authentication process
    Returns:
    When queryType=XSLM_QUERY_PUBLISHER_INFO, the data element PUBLISHER_SECTION, if present, followed by the data element PUBLISHER_USE, if present.
    When queryType=XSLM_QUERY_CUST_DEF_INFO, the data element CUSTOMER_ASSIGNED_APPL_INFO, if present.
    When queryType=XSLM_QUERY_CERTIFICATE, the data element CERTIFICATE.
    When queryType=XSLM_QUERY_CERT_RELATED_INFO, the data element CERTIFICATE_RELATED_INFORMATION
    Throws: CommunicationException
    if a communication error occurs between the license client and the license server
    Throws: LicenseCertificateException
    if the requested method cannot be completed on any license crtificate
    Throws: LicenseClientException
    if a generic license client error occurs
    Throws: ResourceUnavailableException
    if a resource required to execute the requested method is not available

  • record

    public abstract void record(long counterIdentifier,
                                float counter,
                                int authenticationToken) 
     throws CommunicationException, InvalidParameterException, 
     LicenseCertificateException, LicenseClientException, 
     ResourceUnavailableException
    Informs the license system about a metering activity in progress
    Parameters:
    counterIdentifier - the identifier of one of the 8 different counters (defined within the license certificate)
    counter - the value of the number of units the license system should add to or subtract from the total count
    authenticationToken - a 32-bit arbitrary value created by the application and used as part of the licensing system authentication process
    Throws: CommunicationException
    if a communication error occurs between the license client and the license server
    Throws: InvalidParameterException
    if a parameter passed to a method is invalid
    Throws: LicenseCertificateException
    if the requested method cannot be completed on any license crtificate
    Throws: LicenseClientException
    if a generic license client error occurs
    Throws: ResourceUnavailableException
    if a resource required to execute the requested method is not available

  • releaseLicense

    public abstract void releaseLicense(long units,
                                        int authenticationToken)
    throws CommunicationException, InvalidParameterException,
    LicenseCertificateException, LicenseClientException,
    ResourceUnavailableException

    Releases some or all license units associated with this instance of the license client
    Parameters:
    units - number of license units to be released
    authenticationToken - a 32-bit arbitrary value created by the application and used as part of the licensing system authentication process
    Throws: CommunicationException
    if a communication error occurs between the license client and the license server
    Throws: InvalidParameterException
    if a parameter passed to a method is invalid
    Throws: LicenseCertificateException
    if the requested method cannot be completed on any license crtificate
    Throws: LicenseClientException
    if a generic license client error occurs
    Throws: ResourceUnavailableException
    if a resource required to execute the requested method is not available

  • requestLicense

    public abstract long requestLicense(PublicKey publicKey,
                                        String namedUser,
                                        int authenticationToken) 
     throws CommunicationException, InvalidParameterException, 
     LicenseCertificateException, LicenseClientException, 
     ResourceUnavailableException
    Requests the license system to grant default number of units licenses to the specified user.
    Parameters:
    publicKey - the software publisher public key. Used to confirm authenticity of a license certificate. The value passed must match the value of the publisher's public key contained in the license certificate.
    namedUser - the named user for which license units are being requested
    authenticationToken - a 32-bit arbitrary value created by the application and used as part of the licensing system authentication process
    Returns:
    number of license units granted
    Throws: CommunicationException
    if a communication error occurs between the license client and the license server
    Throws: InvalidParameterException
    if a parameter passed to a method is invalid
    Throws: LicenseCertificateException
    if the requested method cannot be completed on any license crtificate
    Throws: LicenseClientException
    if a generic license client error occurs
    Throws: ResourceUnavailableException
    if a resource required to execute the requested method is not available

  • requestLicense

    public abstract long requestLicense(PublicKey publicKey,
                                        long confirmTime,
                                        int authenticationToken) 
     throws CommunicationException, InvalidParameterException, 
     LicenseCertificateException, LicenseClientException, 
     ResourceUnavailableException
    Requests the license system for default number of units licenses (as specified within a license certificate).
    Parameters:
    publicKey - the software publisher public key. Used to confirm authenticity of a license certificate. The value passed must match the value of the publisher's public key contained in the license certificate.
    confirmTime - elapsed time (in seconds) whithin which the license system may expect the next confirm.
    authenticationToken - a 32-bit arbitrary value created by the application and used as part of the licensing system authentication process
    Returns:
    number of license units granted
    Throws: CommunicationException
    if a communication error occurs between the license client and the license server
    Throws: InvalidParameterException
    if a parameter passed to a method is invalid
    Throws: LicenseCertificateException
    if the requested method cannot be completed on any license crtificate
    Throws: LicenseClientException
    if a generic license client error occurs
    Throws: ResourceUnavailableException
    if a resource required to execute the requested method is not available

  • requestLicense

    public abstract long requestLicense(PublicKey publicKey,
                                        String namedUser,
                                        long confirmTime,
                                        long units,
                                        boolean forceNumber,
                                        int authenticationToken) 
     throws CommunicationException, InvalidParameterException, 
     LicenseCertificateException, LicenseClientException, 
     ResourceUnavailableException
    Requests the license system for specified number of units licenses
    Parameters:
    publicKey - the software publisher public key. Used to confirm authenticity of a license certificate. The value passed must match the value of the publisher's public key contained in the license certificate.
    namedUser - the named user for which license units are being requested
    confirmTime - elapsed time (in seconds) whithin which the liscense system may expect the next confirm.
    units - number of license units to be requested
    forceNumber - whether or not a lower number of license units than that specified should be granted
    authenticationToken - a 32-bit arbitrary value created by the application and used as part of the licensing system authentication process
    Returns:
    number of license units granted
    Throws: CommunicationException
    if a communication error occurs between the license client and the license server
    Throws: InvalidParameterException
    if a parameter passed to a method is invalid
    Throws: LicenseCertificateException
    if the requested method cannot be completed on any license crtificate
    Throws: LicenseClientException
    if a generic license client error occurs
    Throws: ResourceUnavailableException
    if a resource required to execute the requested method is not available

  • requestLicense

    public abstract long requestLicense(PublicKey publicKey,
                                        long units,
                                        boolean forceNumber,
                                        int authenticationToken) 
     throws CommunicationException, InvalidParameterException, 
     LicenseCertificateException, LicenseClientException, 
     ResourceUnavailableException
    Requests the license system for specified number of license units
    Parameters:
    publicKey - the software publisher public key. Used to confirm authenticity of a license certificate. The value passed must match the value of the publisher's public key contained in the license certificate.
    units - number of license units to be requested
    forceNumber - whether or not a lower number of license units than that specified should be granted
    authenticationToken - a 32-bit arbitrary value created by the application and used as part of the licensing system authentication process
    Returns:
    number of license units granted
    Throws: CommunicationException
    if a communication error occurs between the license client and the license server
    Throws: InvalidParameterException
    if a parameter passed to a method is invalid
    Throws: LicenseCertificateException
    if the requested method cannot be completed on any license crtificate
    Throws: LicenseClientException
    if a generic license client error occurs
    Throws: ResourceUnavailableException
    if a resource required to execute the requested method is not available

    Interface org.opengroup.xslm.BasicApplicationClient

    public interface BasicApplicationClient The BasicApplicationClient interface is the interface for the Base Functional Level of the XSLM Application API.
    See Also:
    AdvancedApplicationClient, LicenseAgent, LicenseBroker

    Method Index

    confirm()
    Confirms that a license is currently in use.
    queryAPILevel()
    Returns the maximum API specification level supported by all license servers in the licensing system.
    queryFunctionalTowers()
    Returns an array of functional tower identifiers supported by all license servers in the licensing system.
    releaseLicense()
    Releases the licenses associated with this instance of the license client
    requestLicense(PublicKey)
    Requests the license system for default number of units licenses (as specified within a license certificate)

    Methods

  • confirm

    public abstract void confirm() 
     throws CommunicationException, LicenseCertificateException, 
     LicenseClientException, ResourceUnavailableException
    Confirms that a license is currently in use. Should the license system not receive any confirm from the application client within the default time period specified in the certificate, the license is no longer in use and will return it to the pool of free, available licenses.
    Throws: CommunicationException
    if a communication error occurs between the license client and the license server
    Throws: LicenseCertificateException
    if the requested method cannot be completed on any license crtificate
    Throws: LicenseClientException
    if a generic license client error occurs
    Throws: ResourceUnavailableException
    if a resource required to execute the requested method is not available

  • queryAPILevel

    public abstract long queryAPILevel() 
     throws CommunicationException, LicenseClientException, 
     ResourceUnavailableException
    Returns the maximum API specification level supported by all license servers in the licensing system.
    Returns:
    the maximum API specification level supported by all license servers in the licensing system
    Throws: CommunicationException
    if a communication error occurs between the license client and the license server
    Throws: LicenseClientException
    if a generic license client error occurs
    Throws: ResourceUnavailableException
    if a resource required to execute the requested method is not available

  • queryFunctionalTowers

    public abstract long[] queryFunctionalTowers()
    throws CommunicationException, LicenseClientException,
    ResourceUnavailableException

    Returns an array of functional tower identifiers supported by all license servers in the licensing system.
    Returns:
    an array of functional tower identifiers supported by all license servers in the licensing system
    Throws: CommunicationException
    if a communication error occurs between the license client and the license server
    Throws: LicenseClientException
    if a generic license client error occurs
    Throws: ResourceUnavailableException
    if a resource required to execute the requested method is not available

  • releaseLicense

    public abstract void releaseLicense() 
     throws CommunicationException, LicenseCertificateException, 
     LicenseClientException, ResourceUnavailableException
    Releases the licenses associated with this instance of the license client
    Throws: CommunicationException
    if a communication error occurs between the license client and the license server
    Throws: LicenseCertificateException
    if the requested method cannot be completed on any license crtificate
    Throws: LicenseClientException
    if a generic license client error occurs
    Throws: ResourceUnavailableException
    if a resource required to execute the requested method is not available

  • requestLicense

    public abstract long requestLicense(PublicKey publicKey) 
     throws CommunicationException, InvalidParameterException, 
     LicenseCertificateException, LicenseClientException, 
     ResourceUnavailableException
    Requests the license system for default number of units licenses (as specified within a license certificate)
    Parameters:
    publicKey - the software publisher public key. Used to confirm authenticity of a license certificate. The value passed must match the value of the publisher's public key contained in the license certificate.
    Throws: CommunicationException
    if a communication error occurs between the license client and the license server
    Throws: InvalidParameterException
    if a parameter passed to a method is invalid
    Throws: LicenseCertificateException
    if the requested method cannot be completed on any license crtificate
    Throws: LicenseClientException
    if a generic license client error occurs
    Throws: ResourceUnavailableException
    if a resource required to execute the requested method is not available

    Interface org.opengroup.xslm.XSLMConstants

    public interface XSLMConstants
    The XSLMConstants interface defines all the constants used thoughout the org.opengroup.xslm package

    Variable Index

    DEFAULT_CONFIRM_TIME
    Confirm time value used to request default confirm time
    DEFAULT_UNIT
    Number of units value used to request default number of units licenses
    XSLM_QUERY_PUBLISHER_INFO
    Query the application publisher specific section
    XSLM_QUERY_CUST_DEF_INFO
    Query application-related information defined by the customer
    XSLM_QUERY_CERTIFICATE
    Query the certificate as it has been created by the application publisher
    XSLM_QUERY_CERT_RELATED_INFO
    Query the certificate related information such as certificate status

    Variables

    DEFAULT_CONFIRM_TIME

    public static final long DEFAULT_CONFIRM_TIME
    Confirm time value used to request default confirm time

    DEFAULT_UNITS

    public static final long DEFAULT_UNITS
    Number of units value used to request default number of units licenses

    public static final int XSLM_QUERY_PUBLISHER_INFO
    Query the application publisher specific section

    public static final int XSLM_QUERY_CUST_DEF_INFO
    Query application-related information defined by the customer

    public static final int XSLM_QUERY_CERTIFICATE
    Query the certificate as it has been created by the application publisher
    public static final int XSLM_QUERY_CERT_RELATED_INFO
    Query the certificate related information such as certificate status

    Class org.opengroup.xslm.LicenseAgent

    java.lang.Object
       |
       +----org.opengroup.xslm.LicenseAgent

    public abstract class LicenseAgent
    extends Object
    implements BasicApplicationClient, AdvancedApplicationClient, XSLMConstants
    The LicenseAgent class provides LicenseBroker and application clients with access to a specific publisher's implementation of the XSLM API. Whereas the LicenseBroker class provides implementation transparency to application clients, the LicenseAgent class provides server transparency.
    Like other classes in org.opengroup.xslm, the LicenseAgent class has two major components:
    LicenseAgent API (Application Program Interface)
    This is the interface of methods called either by applications needing License Agent services to have their requests forwarded to that specifc publisher's licensing system implementation, or by license brokers routing application client's methods invocation to any of the licensing systems available in the environment. The API consists of all public methods.
    LicenseAgent SPI (Service Provider Interface)
    This is the interface implemented by licensing system publishers that supply specific license use management packages. It consists of all methods whose names are prefixed by engine. Each such method is called by a correspondingly-named public API method. For example, the engineRequestLicense method is called by the requestLicense method. The SPI methods are abstract; publishers must supply a concrete implementation.

    LicenseAgent provides implementation-independent objects, a caller (license broker or application code) can request a particular implementation of a LicenseAgent object from a particular publisher. The system will determine if there is an implementation of the requested LicenseAgent object in the package requested, and throw an exception if there is not.

    See Also:
    BasicApplicationClient, AdvancedApplicationClient, LicenseBroker

    Constructor Index
    LicenseAgent()
     
    Method Index
    confirm()
    Confirms that a license is currently in use.
    confirm(long, int)
    Confirms that a license is currently in use.
    engineConfirm()
    SPI: Confirms that a license is currently in use.
    engineConfirm(long, int)
    SPI: Confirms that a license is currently in use.
    engineGetAuthenticationSignature()
    SPI: Returns the digital signature created by the licensing system from the input and output parameters and the authorization token.
    engineLogMessage(String, int)
    SPI: Logs and application-specified text message into license system's log.
    engineQueryAPILevel()
    SPI: Returns the maximum API specification level supported by all license servers in the licensing system.
    engineQueryCertificateInfo(int, int)
    SPI: Returns various types of license certificate information
    engineQueryFunctionalTowers()
    SPI: Returns the maximum API specification level supported by all license servers in the licensing system.
    engineRecord(long, float, int)
    SPI: Informs the license system about a metering activity in progress
    engineReleaseLicense()
    SPI: Releases the licenses associated with this instance of the license client
    engineReleaseLicense(long, int)
    SPI: Releases some or all license units associated with this instance of the license client
    engineRequestLicense(PublicKey)
    SPI: Requests the license system for default number of units licenses (as specified within a license certificate).
    engineRequestLicense(PublicKey, String, long, long, boolean, int)
    SPI: Requests the license system for the specified number of units licenses.
    getAdvancedApplicationClientInstance(String, Session, String, long, long, long)
    Generates an AdvancedApplicationClient object as suppled from the specified publisher.
    getAuthenticationSignature()
    Returns the digital signature created by the licensing system from the input and output parameters and the authorization token.
    getBasicApplicationClientInstance(String, String, long, long, long)
    Generates a BasicApplicationClient object as supplied from the specified publisher.
    init(Session, String, long, long, long)
    Initializes the LicenseBroker object returned by either a getBasicApplicationClientInstance or getAdvancedApplicationClientInstance method invocation.
    logMessage(String, int)
    Logs and application-specified text message into license system's log
    queryAPILevel()
    Returns the maximum API specification level supported by all license servers in the licensing system.
    queryCertificateInfo(int, int)
    Returns various types of license certificate information.
    queryFunctionalTowers()
    Returns an array of functional tower identifiers supported by all license servers in the licensing system.
    record(long, float, int)
    Informs the license system about a metering activity in progress
    releaseLicense()
    Releases the licenses associated with this instance of the license client
    releaseLicense(long, int)
    Releases some or all license units associated with this instance of the license client
    requestLicense(PublicKey)
    Requests the license system for default number of units licenses (as specified within a license certificate).
    requestLicense(PublicKey, long, boolean, int)
    Requests the license system for specified number of license units
    requestLicense(PublicKey, long, int)
    Requests the license system for default number of units licenses (as specified within a license certificate).
    requestLicense(PublicKey, String, int)
    Requests the license system for default number of units licenses (as specified within a license certificate).
    requestLicense(PublicKey, String, long, long, boolean, int)
    Requests the license system for specified number of units licenses

    Constructors

    LicenseAgent

     public LicenseAgent()

    Methods

  • getBasicApplicationClientInstance

    public static BasicApplicationClient getBasicApplicationClientInstance
        (String licensingSystemPublisher,
        String publisherID,
        long productID,
        long versionID,
        long featureID)
     throws NoSuchPublisherException, NoSuchAPILevelException
    Generates a BasicApplicationClient object as supplied from the specified publisher.
    Parameters:
    licensingSystemPublisher - the name of the license system publisher.
    publisherID - the identifier of the software publisher
    productID - the identifier of the product
    versionID - the identifier of the version
    featureID - the identifier of the feature
    Returns:
    the new BasicApplicationClient object
    Throws: NoSuchPublisherException
    if there is no subclass of LicenseAgent provided by the specified publisher.
    Throws: NoSuchAPILevelException
    if the package provded by the specified publisher does not contain the requested API level
    See Also:
    LicenseBroker, Publisher

  • getAdvancedApplicationClientInstance

    public static AdvancedApplicationClient
        getAdvancedApplicationClientInstance(String licensingSystemPublisher,
                                            Session session,
                                            String publisherID,
                                            long productID,
                                            long versionID,
                                            long featureID) 
     throws NoSuchPublisherException, NoSuchAPILevelException
    Generates an AdvancedApplicationClient object as suppled from the specified publisher.
    Parameters:
    licensingSystemPublisher - the name of the license system publisher.
    session - the session this application client object is bound to
    publisherID - the identifier of the software publisher
    productID - the identifier of the product
    versionID - the identifier of the version
    featureID - the identifier of the feature
    Returns:
    the new AdvancedApplicationClient object
    Throws: NoSuchPublisherException
    if there is no subclass of LicenseAgent provided by the specified publisher.
    Throws: NoSuchAPILevelException
    if the package provded by the specified publisher does not contain the requested API level
    See Also:
    Publisher

  • confirm

    public void confirm() 
     throws CommunicationException, LicenseCertificateException, 
     LicenseClientException, ResourceUnavailableException
    Confirms that a license is currently in use. Should the license system not receive any confirm fromthe application client within the default time period specified in the certificate, the license is no longer in use and will return it to the pool of free, available licenses.
    Throws: CommunicationException
    if a communication error occurs between the license client and the license server
    Throws: LicenseCertificateException
    if the requested method cannot be completed on any license crtificate
    Throws: LicenseClientException
    if a generic license client error occurs
    Throws: ResourceUnavailableException
    if a resource required to execute the requested method is not available

  • releaseLicense

    public void releaseLicense() 
     throws CommunicationException, LicenseCertificateException, 
     LicenseClientException, ResourceUnavailableException
    Releases the licenses associated with this instance of the license client
    Throws: CommunicationException
    if a communication error occurs between the license client and the license server
    Throws: LicenseCertificateException
    if the requested method cannot be completed on any license crtificate
    Throws: LicenseClientException
    if a generic license client error occurs
    Throws: ResourceUnavailableException
    if a resource required to execute the requested method is not available

  • requestLicense

    public long requestLicense(PublicKey publicKey) 
     throws CommunicationException, InvalidParameterException, 
     LicenseCertificateException, LicenseClientException, 
     ResourceUnavailableException
    Requests the license system for default number of units licenses (as specified within a license certificate).
    Parameters:
    publicKey - the software publisher public key. Used to confirm authenticity of a license certificate. The value passed must match the value of the publisher's public key contained in the license certificate.
    Returns:
    number of license units granted
    Throws: CommunicationException
    if a communication error occurs between the license client and the license server
    Throws: InvalidParameterException
    if a parameter passed to a method is invalid
    Throws: LicenseCertificateException
    if the requested method cannot be completed on any license crtificate
    Throws: LicenseClientException
    if a generic license client error occurs
    Throws: ResourceUnavailableException
    if a resource required to execute the requested method is not available

  • confirm

    public void confirm(long confirmTime,
                        int authenticationToken) 
     throws CommunicationException, InvalidParameterException, 
     LicenseCertificateException, LicenseClientException, 
     ResourceUnavailableException
    Confirms that a license is currently in use. Should the license system not receive any confirm from the application client within the default time period specified in the certificate, the license is no longer in use and will return it to the pool of free, available licenses.
    Parameters:
    confirmTime - elapsed time (in seconds) whithin which the liscense system may expect the next confirm.
    authenticationToken - a 32-bit arbitrary value created by the application and used as part of the licensing system authentication process
    Throws: CommunicationException
    if a communication error occurs between the license client and the license server
    Throws: InvalidParameterException
    if a parameter passed to a method is invalid
    Throws: LicenseCertificateException
    if the requested method cannot be completed on any license crtificate
    Throws: LicenseClientException
    if a generic license client error occurs
    Throws: ResourceUnavailableException
    if a resource required to execute the requested method is not available

  • getAuthenticationSignature

    public byte[] getAuthenticationSignature() 
     throws LicenseClientException
    Returns the digital signature created by the licensing system from the input and output parameters and the authorization token.
    Returns:
    the digital signature created by the licensing system.
    Throws: LicenseClientException
    if a generic license client error occurs

  • logMessage

    public void logMessage(String message,
                           int authenticationToken) 
     throws CommunicationException, InvalidParameterException, 
     LicenseCertificateException, LicenseClientException, 
     ResourceUnavailableException
    Logs and application-specified text message into license system's log
    Parameters:
    message - the text string of the message, it can be of any length; however, a licensing system is not required to accept more than 4096 bytes.
    authenticationToken - a 32-bit arbitrary value created by the application and used as part of the licensing system authentication process
    Throws: CommunicationException
    if a communication error occurs between the license client and the license server
    Throws: InvalidParameterException
    if a parameter passed to a method is invalid
    Throws: LicenseCertificateException
    if the requested method cannot be completed on any license crtificate
    Throws: LicenseClientException
    if a generic license client error occurs
    Throws: ResourceUnavailableException
    if a resource required to execute the requested method is not available

  • queryAPILevel

    public long queryAPILevel() 
     throws CommunicationException, LicenseClientException, 
     ResourceUnavailableException
    Returns the maximum API specification level supported by all license servers in the licensing system.
    Returns:
    the API level supported by all license servers in the licensing system
    Throws: CommunicationException
    if a communication error occurs between the license client and the license server
    Throws: LicenseClientException
    if a generic license client error occurs
    Throws: ResourceUnavailableException
    if a resource required to execute the requested method is not available

  • queryFunctionalTowers

    public long[] queryFunctionalTowers() 
     throws CommunicationException, LicenseClientException, 
     ResourceUnavailableException
    Returns an array of functional tower identifiers supported by all license servers in the licensing system.
    Returns:
    an array of functional tower identifiers supported by all license servers in the licensing system
    Throws: CommunicationException
    if a communication error occurs between the license client and the license server
    Throws: LicenseClientException
    if a generic license client error occurs
    Throws: ResourceUnavailableException
    if a resource required to execute the requested method is not available

  • queryCertificateInfo

    public byte[] queryCertificateInfo(int queryType, int authenticationToken) 
     throws CommunicationException, LicenseCertificateException, 
     LicenseClientException, ResourceUnavailableException 
    Returns the various types of license certificate information associated with this license client object.
    Parameters:
    queryType - a value which identifies the information to be returned
    authenticationToken - a 32-bit arbitrary value created by the application and used as part of the licensing system authentication process
    Returns:
    When queryType=XSLM_QUERY_PUBLISHER_INFO, the data element PUBLISHER_SECTION, if present, followed by the data element PUBLISHER_USE, if present.
    When queryType=XSLM_QUERY_CUST_DEF_INFO, the data element CUSTOMER_ASSIGNED_APPL_INFO, if present.
    When queryType=XSLM_QUERY_CERTIFICATE, the data element CERTIFICATE.
    When queryType=XSLM_QUERY_CERT_RELATED_INFO, the data element CERTIFICATE_RELATED_INFORMATION
    Throws: CommunicationException
    if a communication error occurs between the license client and the license server
    Throws: LicenseCertificateException
    if the requested method cannot be completed on any license crtificate
    Throws: LicenseClientException
    if a generic license client error occurs
    Throws: ResourceUnavailableException
    if a resource required to execute the requested method is not available

  • record

    public void record(long counterIdentifier,
                       float counter,
                       int authenticationToken) 
     throws CommunicationException, InvalidParameterException,
     LicenseCertificateException, LicenseClientException, 
     ResourceUnavailableException
    Informs the license system about a metering activity in progress
    Parameters:
    counterIdentifier - the identifier of one of the 8 different counters (defined within the license certificate)
    counter - the value of the number of units the license system should add to or subtract from the total count
    authenticationToken - a 32-bit arbitrary value created by the application and used as part of the licensing system authentication process
    Throws: CommunicationException
    if a communication error occurs between the license client and the license server
    Throws: InvalidParameterException
    if a parameter passed to a method is invalid
    Throws: LicenseCertificateException
    if the requested method cannot be completed on any license crtificate
    Throws: LicenseClientException
    if a generic license client error occurs
    Throws: ResourceUnavailableException
    if a resource required to execute the requested method is not available

  • releaseLicense

    public void releaseLicense(long units,
                               int authenticationToken) 
     throws CommunicationException, InvalidParameterException, 
     LicenseCertificateException, LicenseClientException, 
     ResourceUnavailableException
    Releases some or all license units associated with this instance of the license client
    Parameters:
    units - number of license units to be released
    authenticationToken - a 32-bit arbitrary value created by the application and used as part of the licensing system authentication process
    Throws: CommunicationException
    if a communication error occurs between the license client and the license server
    Throws: InvalidParameterException
    if a parameter passed to a method is invalid
    Throws: LicenseCertificateException
    if the requested method cannot be completed on any license crtificate
    Throws: LicenseClientException
    if a generic license client error occurs
    Throws: ResourceUnavailableException
    if a resource required to execute the requested method is not available

  • requestLicense

    public long requestLicense(PublicKey publicKey,
                               String namedUser,
                               int authenticationToken) 
     throws CommunicationException, InvalidParameterException, 
     LicenseCertificateException, LicenseClientException, 
     ResourceUnavailableException
    Requests the license system for default number of units licenses (as specified within a license certificate).
    Parameters:
    publicKey - the software publisher public key. Used to confirm authenticity of a license certificate. The value passed must match the value of the publisher's public key contained in the license certificate.
    namedUser - the named user for which license units are being requested
    authenticationToken - a 32-bit arbitrary value created by the application and used as part of the licensing system authentication process
    Returns:
    number of license units granted
    Throws: CommunicationException
    if a communication error occurs between the license client and the license server
    Throws: InvalidParameterException
    if a parameter passed to a method is invalid
    Throws: LicenseCertificateException
    if the requested method cannot be completed on any license crtificate
    Throws: LicenseClientException
    if a generic license client error occurs
    Throws: ResourceUnavailableException
    if a resource required to execute the requested method is not available

  • requestLicense

    public long requestLicense(PublicKey publicKey,
                               long confirmTime,
                               int authenticationToken) 
     throws CommunicationException, InvalidParameterException, 
     LicenseCertificateException, LicenseClientException, 
     ResourceUnavailableException
    Requests the license system for default number of units licenses (as specified within a license certificate).
    Parameters:
    publicKey - the software publisher public key. Used to confirm authenticity of a license certificate. The value passed must match the value of the publisher's public key contained in the license certificate.
    confirmTime - elapsed time (in seconds) whithin which the license system may expect the next confirm.
    authenticationToken - a 32-bit arbitrary value created by the application and used as part of the licensing system authentication process
    Returns:
    number of license units granted
    Throws: CommunicationException
    if a communication error occurs between the license client and the license server
    Throws: InvalidParameterException
    if a parameter passed to a method is invalid
    Throws: LicenseCertificateException
    if the requested method cannot be completed on any license crtificate
    Throws: LicenseClientException
    if a generic license client error occurs
    Throws: ResourceUnavailableException
    if a resource required to execute the requested method is not available

  • requestLicense

    public long requestLicense(PublicKey publicKey,
                               String namedUser,
                               long confirmTime,
                               long units,
                               boolean forceNumber,
                               int authenticationToken) 
     throws CommunicationException, InvalidParameterException, 
     LicenseCertificateException, LicenseClientException, 
     ResourceUnavailableException
    Requests the license system for specified number of units licenses
    Parameters:
    publicKey - the software publisher public key. Used to confirm authenticity of a license certificate. The value passed must match the value of the publisher's public key contained in the license certificate.
    namedUser - the named user for which license units are being requested
    confirmTime - elapsed time (in seconds) whithin which the liscense system may expect the next confirm.
    units - number of license units to be requested
    forceNumber - whether or not a lower number of license units than that specified should be granted
    authenticationToken - a 32-bit arbitrary value created by the application and used as part of the licensing system authentication process
    Returns:
    number of license units granted
    Throws: CommunicationException
    if a communication error occurs between the license client and the license server
    Throws: InvalidParameterException
    if a parameter passed to a method is invalid
    Throws: LicenseCertificateException
    if the requested method cannot be completed on any license crtificate
    Throws: LicenseClientException
    if a generic license client error occurs
    Throws: ResourceUnavailableException
    if a resource required to execute the requested method is not available

  • requestLicense

    public long requestLicense(PublicKey publicKey,
                               long units,
                               boolean forceNumber,
                               int authenticationToken) 
     throws CommunicationException, InvalidParameterException, 
     LicenseCertificateException, LicenseClientException, 
     ResourceUnavailableException
    Requests the license system for specified number of license units
    Parameters:
    publicKey - the software publisher public key. Used to confirm authenticity of a license certificate. The value passed must match the value of the publisher's public key contained in the license certificate.
    units - number of license units to be requested
    forceNumber - whether or not a lower number of license units than that specified should be granted
    authenticationToken - a 32-bit arbitrary value created by the application and used as part of the licensing system authentication process
    Returns:
    number of license units granted
    Throws: CommunicationException
    if a communication error occurs between the license client and the license server
    Throws: InvalidParameterException
    if a parameter passed to a method is invalid
    Throws: LicenseCertificateException
    if the requested method cannot be completed on any license crtificate
    Throws: LicenseClientException
    if a generic license client error occurs
    Throws: ResourceUnavailableException
    if a resource required to execute the requested method is not available

  • init

    protected final void init(Session session,
                              String publisherID,
                              long productID,
                              long versionID,
                              long featureID)
    Initializes the LicenseBroker object returned by either a getBasicApplicationClientInstance or getAdvancedApplicationClientInstance method invocation.
    Parameters:
    session - the session this LicenseBroker object is associated with
    publisherID - the identifier of the software publisher
    productID - the identifier of the product
    versionID - the identifier of the version
    featureID - the identifier of the feature

  • engineConfirm

    protected abstract void engineConfirm()
    throws CommunicationException, LicenseCertificateException,
    LicenseClientException, ResourceUnavailableException

    SPI: Confirms that a license is currently in use.
    Parameters:
    authenticationToken - a 32-bit arbitrary value created by the application and used as part of the licensing system authentication process
    Throws: CommunicationException
    if a communication error occurs between the license client and the license server
    Throws: LicenseCertificateException
    if the requested method cannot be completed on any license crtificate
    Throws: LicenseClientException
    if a generic license client error occurs
    Throws: ResourceUnavailableException
    if a resource required to execute the requested method is not available

  • engineReleaseLicense

    protected abstract void engineReleaseLicense() 
     throws CommunicationException, LicenseCertificateException, 
     LicenseClientException, ResourceUnavailableException
    SPI: Releases the licenses associated with this instance of the license client
    Parameters:
    authenticationToken - a 32-bit arbitrary value created by the application and used as part of the licensing system authentication process
    Throws: CommunicationException
    if a communication error occurs between the license client and the license server
    Throws: LicenseCertificateException
    if the requested method cannot be completed on any license crtificate
    Throws: LicenseClientException
    if a generic license client error occurs
    Throws: ResourceUnavailableException
    if a resource required to execute the requested method is not available

  • engineRequestLicense

    protected abstract long engineRequestLicense(PublicKey publicKey) 
     throws CommunicationException, InvalidParameterException, 
     LicenseCertificateException, LicenseClientException, 
     ResourceUnavailableException
    SPI: Requests the license system for default number of units licenses (as specified within a license certificate).
    Parameters:
    publicKey - the software publisher public key. Used to confirm authenticity of a license certificate. The value passed must match the value of the publisher's public key contained in the license certificate.
    authenticationToken - a 32-bit arbitrary value created by the application and used as part of the licensing system authentication process
    Returns:
    number of license units granted
    Throws: CommunicationException
    if a communication error occurs between the license client and the license server
    Throws: InvalidParameterException
    if a parameter passed to a method is invalid
    Throws: LicenseCertificateException
    if the requested method cannot be completed on any license crtificate
    Throws: LicenseClientException
    if a generic license client error occurs
    Throws: ResourceUnavailableException
    if a resource required to execute the requested method is not available

  • engineConfirm

    protected abstract void engineConfirm(long confirmTime,
                                          int authenticationToken) 
     throws CommunicationException, InvalidParameterException, 
     LicenseCertificateException, LicenseClientException, 
     ResourceUnavailableException
    SPI: Confirms that a license is currently in use.
    Parameters:
    confirmTime - elapsed time (in seconds) whithin which the liscense system may expect the next confirm.
    authenticationToken - a 32-bit arbitrary value created by the application and used as part of the licensing system authentication process
    Throws: CommunicationException
    if a communication error occurs between the license client and the license server
    Throws: InvalidParameterException
    if a parameter passed to a method is invalid
    Throws: LicenseCertificateException
    if the requested method cannot be completed on any license crtificate
    Throws: LicenseClientException
    if a generic license client error occurs
    Throws: ResourceUnavailableException
    if a resource required to execute the requested method is not available

  • engineGetAuthenticationSignature

    protected abstract byte[] engineGetAuthenticationSignature() 
     throws LicenseClientException
    SPI: Returns the digital signature created by the licensing system from the input and output parameters and the authorization token.
    Returns:
    the digital signature created by the licensing system.
    Throws: LicenseClientException
    if a generic license client error occurs

  • engineLogMessage

    protected abstract void engineLogMessage(String message,
                                             int authenticationToken)
     throws CommunicationException, InvalidParameterException,
     LicenseCertificateException, LicenseClientException,
     ResourceUnavailableException
    SPI: Logs and application-specified text message into license system's log.
    Parameters:
    message - the text string of the message, it can be of any length; however, a licensing system is not required to accept more than 4096 bytes.
    authenticationToken - a 32-bit arbitrary value created by the application and used as part of the licensing system authentication process
    Throws: CommunicationException
    if a communication error occurs between the license client and the license server
    Throws: InvalidParameterException
    if a parameter passed to a method is invalid
    Throws: LicenseCertificateException
    if the requested method cannot be completed on any license crtificate
    Throws: LicenseClientException
    if a generic license client error occurs
    Throws: ResourceUnavailableException
    if a resource required to execute the requested method is not available

  • engineQueryAPILevel

    protected abstract long engineQueryAPILevel() 
     throws CommunicationException, LicenseClientException, 
     ResourceUnavailableException
    SPI: Returns the maximum API specification level supported by all license servers in the licensing system.
    Returns:
    the maximum API specification level supported by all license servers in the licensing system
    Throws: CommunicationException
    if a communication error occurs between the license client and the license server
    Throws: LicenseClientException
    if a generic license client error occurs
    Throws: ResourceUnavailableException
    if a resource required to execute the requested method is not available

  • engineQueryFunctionalTowers

    protected abstract long[] engineQueryFunctionalTowers() 
     throws CommunicationException, LicenseClientException, 
     ResourceUnavailableException
    SPI: Returns the maximum API specification level supported by all license servers in the licensing system.
    Returns:
    the maximum API specification level supported by all license servers in the licensing system
    Throws: CommunicationException
    if a communication error occurs between the license client and the license server
    Throws: LicenseClientException
    if a generic license client error occurs
    Throws: ResourceUnavailableException
    if a resource required to execute the requested method is not available

  • engineQueryCertificateInfo

    protected abstract byte[] engineQueryCertificateInfo(int queryType, 
                                  int authenticationToken) 
     throws CommunicationException, LicenseCertificateException,
     LicenseClientException, ResourceUnavailableException 
    SPI: Returns the various types of license certificate information associated with this license client object.
    Parameters:
    queryType - a value which identifies the information to be returned
    authenticationToken - a 32-bit arbitrary value created by the application and used as part of the licensing system authentication process
    Returns:
    When queryType=XSLM_QUERY_PUBLISHER_INFO, the data element PUBLISHER_SECTION, if present, followed by the data element PUBLISHER_USE, if present.
    When queryType=XSLM_QUERY_CUST_DEF_INFO, the data element CUSTOMER_ASSIGNED_APPL_INFO, if present.
    When queryType=XSLM_QUERY_CERTIFICATE, the data element CERTIFICATE.
    When queryType=XSLM_QUERY_CERT_RELATED_INFO, the data element CERTIFICATE_RELATED_INFORMATION
    Throws: CommunicationException
    if a communication error occurs between the license client and the license server
    Throws: LicenseCertificateException
    if the requested method cannot be completed on any license crtificate
    Throws: LicenseClientException
    if a generic license client error occurs
    Throws: ResourceUnavailableException
    if a resource required to execute the requested method is not available

  • engineRecord

    protected abstract void engineRecord(long counterIdentifier,
                                         float counter,
                                         int authenticationToken) 
     throws CommunicationException, InvalidParameterException,
     LicenseCertificateException, LicenseClientException,
     ResourceUnavailableException
    SPI: Informs the license system about a metering activity in progress
    Parameters:
    counterIdentifier - the identifier of one of the 8 different counters (defined within the license certificate)
    counter - the value of the number of units the license system should add to or subtract from the total count
    authenticationToken - a 32-bit arbitrary value created by the application and used as part of the licensing system authentication process
    Throws: CommunicationException
    if a communication error occurs between the license client and the license server
    Throws: InvalidParameterException
    if a parameter passed to a method is invalid
    Throws: LicenseCertificateException
    if the requested method cannot be completed on any license crtificate
    Throws: LicenseClientException
    if a generic license client error occurs
    Throws: ResourceUnavailableException
    if a resource required to execute the requested method is not available

  • engineReleaseLicense

    protected abstract void engineReleaseLicense(long units,
                                                 int authenticationToken) 
     throws CommunicationException, InvalidParameterException,
     LicenseCertificateException, LicenseClientException,
     ResourceUnavailableException
    SPI: Releases some or all license units associated with this instance of the license client
    Parameters:
    authenticationToken - a 32-bit arbitrary value created by the application and used as part of the licensing system authentication process
    units - number of license units to be released
    Throws: CommunicationException
    if a communication error occurs between the license client and the license server
    Throws: InvalidParameterException
    if a parameter passed to a method is invalid
    Throws: LicenseCertificateException
    if the requested method cannot be completed on any license crtificate
    Throws: LicenseClientException
    if a generic license client error occurs
    Throws: ResourceUnavailableException
    if a resource required to execute the requested method is not available

  • engineRequestLicense

    protected abstract long engineRequestLicense(PublicKey publicKey,
                                                 String namedUser,
                                                 long confirmTime,
                                                 long units,
                                                 boolean forceNumber,
                                                 int authenticationToken)
     throws CommunicationException, InvalidParameterException,
     LicenseCertificateException, LicenseClientException,
     ResourceUnavailableException
    SPI: Requests the license system for the specified number of units licenses.
    Parameters:
    publicKey - the software publisher public key. Used to confirm authenticity of a license certificate. The value passed must match the value of the publisher's public key contained in the license certificate.
    namedUser - the named user for which license units are being requested
    confirmTime - elapsed time (in seconds) whithin which the liscense system may expect the next confirm.
    units - number of license units to be requested
    forceNumber - whether or not a lower number of license units than that specified should be granted
    authenticationToken - a 32-bit arbitrary value created by the application and used as part of the licensing system authentication process
    Returns:
    number of license units granted
    Throws: CommunicationException
    if a communication error occurs between the license client and the license server
    Throws: InvalidParameterException
    if a parameter passed to a method is invalid
    Throws: LicenseCertificateException
    if the requested method cannot be completed on any license crtificate
    Throws: LicenseClientException
    if a generic license client error occurs
    Throws: ResourceUnavailableException
    if a resource required to execute the requested method is not available

    Class org.opengroup.xslm.LicenseBroker

    java.lang.Object
       |
       +----org.opengroup.xslm.LicenseBroker

    public abstract class LicenseBroker
    extends Object
    implements BasicApplicationClient, AdvancedApplicationClient, XSLMConstants The LicenseBroker class is used to render the presence of multiple licensing systems implementations transparent to application clients; that is to create the illusion of a single logical license management system, when two or more implementations are available in the environment.
    Like other classes in org.opengroup.xslm, the LicenseBroker class has two major components:
    LicenseBroker API (Application Program Interface)
    This is the interface of methods called by applications needing License Broker services to have their requests routed to real implementations of licensing systems available in the environment. The API consists of all public methods.
    LicenseBroker SPI (Service Provider Interface)
    This is the interface implemented by licensing system publishers that supply specific license use management packages. It consists of all methods whose names are prefixed by engine. Each such method is called by a correspondingly-named public API method. For example, the engineRequestLicense method is called by the requestLicense method. The SPI methods are abstract; publishers must supply a concrete implementation.

    LicenseBroker provides implementation-independent objects, a caller (application code) can request a LicenseBroker object, the system will determine if there is an implementation available in the environment, and if there is more than one, if there is a preferred one.

    See Also:
    BasicApplicationClient, AdvancedApplicationClient, LicenseAgent

    Constructor Index
    LicenseBroker()
     
    Method Index
    confirm()
    Confirms that a license is currently in use.
    confirm(long, int)
    Confirms that a license is currently in use.
    engineConfirm()
    SPI: Confirms that a license is currently in use.
    engineConfirm(long, int)
    SPI: Confirms that a license is currently in use.
    engineGetAuthenticationSignature()
    SPI: Returns the digital signature created by the licensing system from the input and output parameters and the authorization token.
    engineGetLicensingSystemPublisherID()
    SPI: Returns the licensing system publisher identifier of this LicenseBroker object.
    engineLogMessage(String, int)
    SPI: Logs and application-specified text message into license system's log.
    engineQueryAPILevel()
    Returns the API level supported by all license servers in the licensing system.
    engineQueryCertificateInfo(int, int)
    Returns various types of license certificate information.
    engineQueryFunctionalTowers()
    SPI: Returns the maximum API specification level supported by all license servers in the licensing system.
    engineRecord(long, float, int)
    SPI: Informs the license system about a metering activity in progress
    engineReleaseLicense()
    SPI: Releases the licenses associated with this instance of the license client
    engineReleaseLicense(long, int)
    SPI: Releases some or all license units associated with this instance of the license client
    engineRequestLicense(PublicKey)
    SPI: Requests the license system for default number of units licenses (as specified within a license certificate).
    engineRequestLicense(PublicKey, String, long, long, boolean, int)
    SPI: Requests the license system for the specified number of units licenses.
    getAdvancedApplicationClientInstance(Session, String, long, long, long)
    Generates an AdvancedApplicationClient object of the default LicenseUseManagement package.
    getAuthenticationSignature()
    Returns the digital signature created by the licensing system from the input and output parameters and the authorization token.
    getBasicApplicationClientInstance(String, long, long, long)
    Generates a BasicApplicationClient object of the default LicenseUseManagement package.
    getLicensingSystemPublisherID()
    Returns the licensing system publisher identifier of this LicenseBroker object.
    init(Session, String, long, long, long)
    Initializes the LicenseBroker object returned by either a getBasicApplicationClientInstance or getAdvancedApplicationClientInstance method invocation.
    logMessage(String, int)
    Logs and application-specified text message into license system's log
    queryAPILevel()
    Returns the maximum API specification level supported by all license servers in the licensing system.
    queryCertificateInfo(int, int)
    Returns various types of license certificate information
    queryFunctionalTowers()
    Returns an array of functional tower identifiers supported by all license servers in the licensing system.
    record(long, float, int)
    Informs the license system about a metering activity in progress
    releaseLicense()
    Releases the licenses associated with this instance of the license client
    releaseLicense(long, int)
    Releases some or all license units associated with this instance of the license client
    requestLicense(PublicKey)
    Requests the license system for default number of units licenses (as specified within a license certificate).
    requestLicense(PublicKey, long, boolean, int)
    Requests the license system for the specified number of license units
    requestLicense(PublicKey, long, int)
    Requests the license system for default number of units licenses (as specified within a license certificate).
    requestLicense(PublicKey, String, int)
    Requests the license system for default number of units licenses (as specified within a license certificate).
    requestLicense(PublicKey, String, long, long, boolean, int)
    Requests the license system for specified number of units licenses

    Constructors

    LicenseBroker

     public LicenseBroker()

    Methods

  • getBasicApplicationClientInstance

    public static BasicApplicationClient 
        getBasicApplicationClientInstance(String publisherID,
                                         long productID,
                                         long versionID,
                                         long featureID) 
     throws NoSuchPublisherException, NoSuchAPILevelException
    Generates a BasicApplicationClient object of the default LicenseUseManagement package. The default LicenseUseManagement package is looked for in the xslm.properties file.
    Parameters:
    publisherID - the identifier of the software publisher
    productID - the identifier of the product
    versionID - the identifier of the version
    featureID - the identifier of the feature
    Returns:
    the new BasicApplicationClient object.
    Throws: NoSuchPublisherException
    if there is no subclass of LicenseAgent provided by the specified publisher.
    Throws: NoSuchAPILevelException
    if the package provded by the specified publisher does not contain the requested API level

  • getAdvancedApplicationClientInstance

    public static AdvancedApplicationClient
        getAdvancedApplicationClientInstance(Session session,
                                             String publisherID,
                                             long productID,
                                             long versionID,
                                             long featureID)
    throws NoSuchPublisherException, NoSuchAPILevelException

    Generates an AdvancedApplicationClient object of the default LicenseUseManagement package. The default LicenseUseManagement package is looked for in the xslm.properties file.
    Parameters:
    session - the session this application client object is bound to
    publisherID - the identifier of the software publisher
    productID - the identifier of the product
    versionID - the identifier of the version
    featureID - the identifier of the feature
    Returns:
    the new AdvancedApplicationClient object.
    Throws: NoSuchPublisherException
    if there is no subclass of LicenseAgent provided by the specified publisher.
    Throws: NoSuchAPILevelException
    if the package provded by the specified publisher does not contain the requested API level

  • confirm

    public void confirm() 
     throws CommunicationException, LicenseCertificateException,
     LicenseClientException, ResourceUnavailableException
    Confirms that a license is currently in use. Should the license system not receive any confirm fromthe application client within the default time period specified in the certificate, the license is no longer in use and will return it to the pool of free, available licenses.
    Throws: CommunicationException
    if a communication error occurs between the license client and the license server
    Throws: LicenseCertificateException
    if the requested method cannot be completed on any license crtificate
    Throws: LicenseClientException
    if a generic license client error occurs
    Throws: ResourceUnavailableException
    if a resource required to execute the requested method is not available

  • releaseLicense

    public void releaseLicense() 
     throws CommunicationException, LicenseCertificateException,
     LicenseClientException, ResourceUnavailableException
    Releases the licenses associated with this instance of the license client
    Throws: CommunicationException
    if a communication error occurs between the license client and the license server
    Throws: LicenseCertificateException
    if the requested method cannot be completed on any license crtificate
    Throws: LicenseClientException
    if a generic license client error occurs
    Throws: ResourceUnavailableException
    if a resource required to execute the requested method is not available

  • requestLicense

    public long requestLicense(PublicKey publicKey) 
     throws CommunicationException, InvalidParameterException,
     LicenseCertificateException, LicenseClientException,
     ResourceUnavailableException
    Requests the license system for default number of units licenses (as specified within a license certificate).
    Parameters:
    publicKey - the software publisher public key. Used to confirm authenticity of a license certificate. The value passed must match the value of the publisher's public key contained in the license certificate.
    Returns:
    number of license units granted
    Throws: CommunicationException
    if a communication error occurs between the license client and the license server
    Throws: InvalidParameterException
    if a parameter passed to a method is invalid
    Throws: LicenseCertificateException
    if the requested method cannot be completed on any license crtificate
    Throws: LicenseClientException
    if a generic license client error occurs
    Throws: ResourceUnavailableException
    if a resource required to execute the requested method is not available

  • confirm

    public void confirm(long confirmTime,
                        int authenticationToken) 
     throws CommunicationException, InvalidParameterException,
     LicenseCertificateException, LicenseClientException,
     ResourceUnavailableException
    Confirms that a license is currently in use. Should the license system not receive any confirm from the application client within the default time period specified in the certificate, the license is no longer in use and will return it to the pool of free, available licenses.
    Parameters:
    confirmTime - elapsed time (in seconds) whithin which the liscense system may expect the next confirm.
    authenticationToken - a 32-bit arbitrary value created by the application and used as part of the licensing system authentication process
    Throws: CommunicationException
    if a communication error occurs between the license client and the license server
    Throws: InvalidParameterException
    if a parameter passed to a method is invalid
    Throws: LicenseCertificateException
    if the requested method cannot be completed on any license crtificate
    Throws: LicenseClientException
    if a generic license client error occurs
    Throws: ResourceUnavailableException
    if a resource required to execute the requested method is not available

  • getAuthenticationSignature

    public byte[] getAuthenticationSignature() 
     throws LicenseClientException
    Returns the digital signature created by the licensing system from the input and output parameters and the authorization token.
    Returns:
    the digital signature created by the licensing system.
    Throws: LicenseClientException
    if a generic license client error occurs

  • getLicensingSystemPublisherID

    public String getLicensingSystemPublisherID() 
     throws LicenseClientException
    Returns the licensing system publisher identifier of this LicenseBroker object. It may be used to determine how to calculate the digital signature required to authenticate the licensing system itself.
    Returns:
    the licensing system publisher identifier of this LicenseBrokerObject.
    Throws: LicenseClientException
    if a generic license client error occurs

  • logMessage

    public void logMessage(String message,
                           int authenticationToken) 
     throws CommunicationException, InvalidParameterException,
     LicenseCertificateException, LicenseClientException,
     ResourceUnavailableException
    Logs and application-specified text message into license system's log
    Parameters:
    message - the text string of the message, it can be of any length; however, a licensing system is not required to accept more than 4096 bytes.
    authenticationToken - a 32-bit arbitrary value created by the application and used as part of the licensing system authentication process
    Throws: CommunicationException
    if a communication error occurs between the license client and the license server
    Throws: InvalidParameterException
    if a parameter passed to a method is invalid
    Throws: LicenseCertificateException
    if the requested method cannot be completed on any license crtificate
    Throws: LicenseClientException
    if a generic license client error occurs
    Throws: ResourceUnavailableException
    if a resource required to execute the requested method is not available

  • queryAPILevel

    public long queryAPILevel() 
     throws CommunicationException, LicenseClientException,
     ResourceUnavailableException
    Returns the maximum API specification level supported by all license servers in the licensing system.
    Returns:
    the API level supported by all license servers in the licensing system
    Throws: CommunicationException
    if a communication error occurs between the license client and the license server
    Throws: LicenseClientException
    if a generic license client error occurs
    Throws: ResourceUnavailableException
    if a resource required to execute the requested method is not available

  • queryFunctionalTowers

    public long[] queryFunctionalTowers() 
     throws CommunicationException, LicenseClientException,
     ResourceUnavailableException
    Returns an array of functional tower identifiers supported by all license servers in the licensing system.
    Returns:
    an array of functional tower identifiers supported by all license servers in the licensing system
    Throws: CommunicationException
    if a communication error occurs between the license client and the license server
    Throws: LicenseClientException
    if a generic license client error occurs
    Throws: ResourceUnavailableException
    if a resource required to execute the requested method is not available

  • queryCertificateInfo

    public byte[] queryCertificateInfo(int queryType, 
                                       int authenticationToken) 
     throws CommunicationException, LicenseCertificateException,
     LicenseClientException, ResourceUnavailableException 
    Returns the various types of license certificate information associated with this license client object
    Parameters:
    queryType - a value which identifies the information to be returned
    authenticationToken - a 32-bit arbitrary value created by the application and used as part of the licensing system authentication process
    Returns:
    When queryType=XSLM_QUERY_PUBLISHER_INFO, the data element PUBLISHER_SECTION, if present, followed by the data element PUBLISHER_USE, if present.
    When queryType=XSLM_QUERY_CUST_DEF_INFO, the data element CUSTOMER_ASSIGNED_APPL_INFO, if present.
    When queryType=XSLM_QUERY_CERTIFICATE, the data element CERTIFICATE.
    When queryType=XSLM_QUERY_CERT_RELATED_INFO, the data element CERTIFICATE_RELATED_INFORMATION
    Throws: CommunicationException
    if a communication error occurs between the license client and the license server
    Throws: LicenseCertificateException
    if the requested method cannot be completed on any license crtificate
    Throws: LicenseClientException
    if a generic license client error occurs
    Throws: ResourceUnavailableException
    if a resource required to execute the requested method is not available

  • record

    public void record(long counterIdentifier,
                       float counter,
                       int authenticationToken) 
     throws CommunicationException, InvalidParameterException,
     LicenseCertificateException, LicenseClientException,
     ResourceUnavailableException
    Informs the license system about a metering activity in progress
    Parameters:
    counterIdentifier - the identifier of one of the 8 different counters (defined within the license certificate)
    counter - the value of the number of units the license system should add to or subtract from the total count
    authenticationToken - a 32-bit arbitrary value created by the application and used as part of the licensing system authentication process
    Throws: CommunicationException
    if a communication error occurs between the license client and the license server
    Throws: InvalidParameterException
    if a parameter passed to a method is invalid
    Throws: LicenseCertificateException
    if the requested method cannot be completed on any license crtificate
    Throws: LicenseClientException
    if a generic license client error occurs
    Throws: ResourceUnavailableException
    if a resource required to execute the requested method is not available

  • releaseLicense

    public void releaseLicense(long units,
                              int authenticationToken) 
     throws CommunicationException, InvalidParameterException,
     LicenseCertificateException, LicenseClientException,
     ResourceUnavailableException
    Releases some or all license units associated with this instance of the license client
    Parameters:
    units - number of license units to be released
    authenticationToken - a 32-bit arbitrary value created by the application and used as part of the licensing system authentication process
    Throws: CommunicationException
    if a communication error occurs between the license client and the license server
    Throws: InvalidParameterException
    if a parameter passed to a method is invalid
    Throws: LicenseCertificateException
    if the requested method cannot be completed on any license crtificate
    Throws: LicenseClientException
    if a generic license client error occurs
    Throws: ResourceUnavailableException
    if a resource required to execute the requested method is not available

  • requestLicense

    public long requestLicense(PublicKey publicKey,
                              String namedUser,
                              int authenticationToken) 
     throws CommunicationException, InvalidParameterException,
     LicenseCertificateException, LicenseClientException,
     ResourceUnavailableException
    Requests the license system for default number of units licenses (as specified within a license certificate).
    Parameters:
    publicKey - the software publisher public key. Used to confirm authenticity of a license certificate. The value passed must match the value of the publisher's public key contained in the license certificate.
    namedUser - the named user for which license units are being requested
    authenticationToken - a 32-bit arbitrary value created by the application and used as part of the licensing system authentication process
    Returns:
    number of license units granted
    Throws: CommunicationException
    if a communication error occurs between the license client and the license server
    Throws: InvalidParameterException
    if a parameter passed to a method is invalid
    Throws: LicenseCertificateException
    if the requested method cannot be completed on any license crtificate
    Throws: LicenseClientException
    if a generic license client error occurs
    Throws: ResourceUnavailableException
    if a resource required to execute the requested method is not available

  • requestLicense

    public long requestLicense(PublicKey publicKey,
                              long confirmTime,
                              int authenticationToken) 
     throws CommunicationException, InvalidParameterException,
     LicenseCertificateException, LicenseClientException,
     ResourceUnavailableException
    Requests the license system for default number of units licenses (as specified within a license certificate).
    Parameters:
    publicKey - the software publisher public key. Used to confirm authenticity of a license certificate. The value passed must match the value of the publisher's public key contained in the license certificate.
    confirmTime - elapsed time (in seconds) whithin which the license system may expect the next confirm.
    authenticationToken - a 32-bit arbitrary value created by the application and used as part of the licensing system authentication process
    Returns:
    number of license units granted
    Throws: CommunicationException
    if a communication error occurs between the license client and the license server
    Throws: InvalidParameterException
    if a parameter passed to a method is invalid
    Throws: LicenseCertificateException
    if the requested method cannot be completed on any license crtificate
    Throws: LicenseClientException
    if a generic license client error occurs
    Throws: ResourceUnavailableException
    if a resource required to execute the requested method is not available

  • requestLicense

    public long requestLicense(PublicKey publicKey,
                              String namedUser,
                              long confirmTime,
                              long units,
                              boolean forceNumber,
                              int authenticationToken) 
     throws CommunicationException, InvalidParameterException,
     LicenseCertificateException, LicenseClientException,
     ResourceUnavailableException
    Requests the license system for specified number of units licenses
    Parameters:
    publicKey - the software publisher public key. Used to confirm authenticity of a license certificate. The value passed must match the value of the publisher's public key contained in the license certificate.
    namedUser - the named user for which license units are being requested
    confirmTime - elapsed time (in seconds) whithin which the liscense system may expect the next confirm.
    units - number of license units to be requested
    forceNumber - whether or not a lower number of license units than that specified should be granted
    authenticationToken - a 32-bit arbitrary value created by the application and used as part of the licensing system authentication process
    Returns:
    number of license units granted
    Throws: CommunicationException
    if a communication error occurs between the license client and the license server
    Throws: InvalidParameterException
    if a parameter passed to a method is invalid
    Throws: LicenseCertificateException
    if the requested method cannot be completed on any license crtificate
    Throws: LicenseClientException
    if a generic license client error occurs
    Throws: ResourceUnavailableException
    if a resource required to execute the requested method is not available

  • requestLicense

    public long requestLicense(PublicKey publicKey,
                              long units,
                              boolean forceNumber,
                              int authenticationToken) 
     throws CommunicationException, InvalidParameterException,
     LicenseCertificateException, LicenseClientException,
     ResourceUnavailableException
    Requests the license system for the specified number of license units
    Parameters:
    publicKey - the software publisher public key. Used to confirm authenticity of a license certificate. The value passed must match the value of the publisher's public key contained in the license certificate.
    units - number of license units to be requested
    forceNumber - whether or not a lower number of license units than that specified should be granted
    authenticationToken - a 32-bit arbitrary value created by the application and used as part of the licensing system authentication process
    Returns:
    number of license units granted
    Throws: CommunicationException
    if a communication error occurs between the license client and the license server
    Throws: InvalidParameterException
    if a parameter passed to a method is invalid
    Throws: LicenseCertificateException
    if the requested method cannot be completed on any license crtificate
    Throws: LicenseClientException
    if a generic license client error occurs
    Throws: ResourceUnavailableException
    if a resource required to execute the requested method is not available

  • init

    protected final void init(Session session,
                             String publisherID,
                             long productID,
                             long versionID,
                             long featureID)
    Initializes the LicenseBroker object returned by either a getBasicApplicationClientInstance or getAdvancedApplicationClientInstance method invocation.
    Parameters:
    session - the session this LicenseBroker object is associated with
    publisherID - the identifier of the software publisher
    productID - the identifier of the product
    versionID - the identifier of the version
    featureID - the identifier of the feature

  • engineConfirm

    protected abstract void engineConfirm()
    throws CommunicationException, LicenseCertificateException,
    LicenseClientException, ResourceUnavailableException

    SPI: Confirms that a license is currently in use.
    Throws: CommunicationException
    if a communication error occurs between the license client and the license server
    Throws: LicenseCertificateException
    if the requested method cannot be completed on any license crtificate
    Throws: LicenseClientException
    if a generic license client error occurs
    Throws: ResourceUnavailableException
    if a resource required to execute the requested method is not available

  • engineReleaseLicense

     protected abstract void engineReleaseLicense() 
    throws CommunicationException, LicenseCertificateException, LicenseClientException, ResourceUnavailableException
    SPI: Releases the licenses associated with this instance of the license client
    Throws: CommunicationException
    if a communication error occurs between the license client and the license server
    Throws: LicenseCertificateException
    if the requested method cannot be completed on any license crtificate
    Throws: LicenseClientException
    if a generic license client error occurs
    Throws: ResourceUnavailableException
    if a resource required to execute the requested method is not available

  • engineRequestLicense

    protected abstract long engineRequestLicense(PublicKey publicKey)
     throws CommunicationException, InvalidParameterException,
     LicenseCertificateException, LicenseClientException,
     ResourceUnavailableException
    SPI: Requests the license system for default number of units licenses (as specified within a license certificate).
    Parameters:
    publicKey - the software publisher public key. Used to confirm authenticity of a license certificate. The value passed must match the value of the publisher's public key contained in the license certificate.
    Returns:
    number of license units granted
    Throws: CommunicationException
    if a communication error occurs between the license client and the license server
    Throws: InvalidParameterException
    if a parameter passed to a method is invalid
    Throws: LicenseCertificateException
    if the requested method cannot be completed on any license crtificate
    Throws: LicenseClientException
    if a generic license client error occurs
    Throws: ResourceUnavailableException
    if a resource required to execute the requested method is not available

  • engineConfirm

    protected abstract void engineConfirm(long confirmTime,
                                         int authenticationToken) 
     throws CommunicationException, InvalidParameterException,
     LicenseCertificateException, LicenseClientException,
     ResourceUnavailableException
    SPI: Confirms that a license is currently in use.
    Parameters:
    confirmTime - elapsed time (in seconds) whithin which the liscense system may expect the next confirm.
    authenticationToken - a 32-bit arbitrary value created by the application and used as part of the licensing system authentication process
    Throws: CommunicationException
    if a communication error occurs between the license client and the license server
    Throws: InvalidParameterException
    if a parameter passed to a method is invalid
    Throws: LicenseCertificateException
    if the requested method cannot be completed on any license crtificate
    Throws: LicenseClientException
    if a generic license client error occurs
    Throws: ResourceUnavailableException
    if a resource required to execute the requested method is not available

  • engineGetLicensingSystemPublisherID

    protected abstract String engineGetLicensingSystemPublisherID() 
     throws LicenseClientException
    SPI: Returns the licensing system publisher identifier of this LicenseBroker object. It may be used to determine how to calculate the digital signature required to authenticate the licensing system itself.
    Returns:
    the licensing system publisher identifier of this LicenseBrokerObject.
    Throws: LicenseClientException
    if a generic license client error occurs

  • engineGetAuthenticationSignature

    protected abstract byte[] engineGetAuthenticationSignature() 
     throws LicenseClientException
    SPI: Returns the digital signature created by the licensing system from the input and output parameters and the authorization token.
    Returns:
    the digital signature created by the licensing system.
    Throws: LicenseClientException
    if a generic license client error occurs

  • engineLogMessage

    protected abstract void engineLogMessage(String message,
                                            int authenticationToken)
     throws CommunicationException, InvalidParameterException,
     LicenseCertificateException, LicenseClientException,
     ResourceUnavailableException
    SPI: Logs and application-specified text message into license system's log.
    Parameters:
    message - the text string of the message, it can be of any length; however, a licensing system is not required to accept more than 4096 bytes.
    authenticationToken - a 32-bit arbitrary value created by the application and used as part of the licensing system authentication process
    Throws: CommunicationException
    if a communication error occurs between the license client and the license server
    Throws: InvalidParameterException
    if a parameter passed to a method is invalid
    Throws: LicenseCertificateException
    if the requested method cannot be completed on any license crtificate
    Throws: LicenseClientException
    if a generic license client error occurs
    Throws: ResourceUnavailableException
    if a resource required to execute the requested method is not available

  • engineQueryAPILevel

    protected abstract long engineQueryAPILevel()
    throws CommunicationException, LicenseClientException,
    ResourceUnavailableException

    Returns the API level supported by all license servers in the licensing system.
    Returns:
    the API level supported by all license servers in the licensing system
    Throws: CommunicationException
    if a communication error occurs between the license client and the license server
    Throws: LicenseClientException
    if a generic license client error occurs
    Throws: ResourceUnavailableException
    if a resource required to execute the requested method is not available

  • engineQueryFunctionalTowers

    protected abstract long[] engineQueryFunctionalTowers() 
     throws CommunicationException, LicenseClientException,
     ResourceUnavailableException
    SPI: Returns the maximum API specification level supported by all license servers in the licensing system.
    Returns:
    the maximum API specification level supported by all license servers in the licensing system
    Throws: CommunicationException
    if a communication error occurs between the license client and the license server
    Throws: LicenseClientException
    if a generic license client error occurs
    Throws: ResourceUnavailableException
    if a resource required to execute the requested method is not available

  • engineQueryCertificateInfo

    protected abstract byte[] engineQueryCertificateInfo(int queryType, 
                                  int authenticationToken)
     throws CommunicationException, LicenseCertificateException,
     LicenseClientException, ResourceUnavailableException
    SPI: Returns the various types of license certificate information associated with this license client object
    Parameters:
    queryType - a value which identifies the information to be returned
    authenticationToken - a 32-bit arbitrary value created by the application and used as part of the licensing system authentication process
    Returns:
    When queryType=XSLM_QUERY_PUBLISHER_INFO, the data element PUBLISHER_SECTION, if present, followed by the data element PUBLISHER_USE, if present.
    When queryType=XSLM_QUERY_CUST_DEF_INFO, the data element CUSTOMER_ASSIGNED_APPL_INFO, if present.
    When queryType=XSLM_QUERY_CERTIFICATE, the data element CERTIFICATE.
    When queryType=XSLM_QUERY_CERT_RELATED_INFO, the data element CERTIFICATE_RELATED_INFORMATION
    Throws: CommunicationException
    if a communication error occurs between the license client and the license server
    Throws: LicenseCertificateException
    if the requested method cannot be completed on any license crtificate
    Throws: LicenseClientException
    if a generic license client error occurs
    Throws: ResourceUnavailableException
    if a resource required to execute the requested method is not available

  • engineRecord

    protected abstract void engineRecord(long counterIdentifier,
                                        float counter,
                                        int authenticationToken) 
     throws CommunicationException, InvalidParameterException,
     LicenseCertificateException, LicenseClientException,
     ResourceUnavailableException
    SPI: Informs the license system about a metering activity in progress
    Parameters:
    counterIdentifier - the identifier of one of the 8 different counters (defined within the license certificate)
    counter - the value of the number of units the license system should add to or subtract from the total count
    authenticationToken - a 32-bit arbitrary value created by the application and used as part of the licensing system authentication process
    Throws: CommunicationException
    if a communication error occurs between the license client and the license server
    Throws: InvalidParameterException
    if a parameter passed to a method is invalid
    Throws: LicenseCertificateException
    if the requested method cannot be completed on any license crtificate
    Throws: LicenseClientException
    if a generic license client error occurs
    Throws: ResourceUnavailableException
    if a resource required to execute the requested method is not available

  • engineReleaseLicense

    protected abstract void engineReleaseLicense(long units,
                                                int authenticationToken)
     throws CommunicationException, InvalidParameterException,
     LicenseCertificateException, LicenseClientException,
     ResourceUnavailableException
    SPI: Releases some or all license units associated with this instance of the license client
    Parameters:
    units - number of license units to be released
    authenticationToken - a 32-bit arbitrary value created by the application and used as part of the licensing system authentication process
    Throws: CommunicationException
    if a communication error occurs between the license client and the license server
    Throws: InvalidParameterException
    if a parameter passed to a method is invalid
    Throws: LicenseCertificateException
    if the requested method cannot be completed on any license crtificate
    Throws: LicenseClientException
    if a generic license client error occurs
    Throws: ResourceUnavailableException
    if a resource required to execute the requested method is not available

  • engineRequestLicense

    protected abstract long engineRequestLicense(PublicKey publicKey,
                                                String namedUser,
                                                long confirmTime,
                                                long units,
                                                boolean forceNumber,
                                                int authenticationToken)
     throws CommunicationException, InvalidParameterException,
     LicenseCertificateException, LicenseClientException,
     ResourceUnavailableException
    SPI: Requests the license system for the specified number of units licenses.
    Parameters:
    publicKey - the software publisher public key. Used to confirm authenticity of a license certificate. The value passed must match the value of the publisher's public key contained in the license certificate.
    namedUser - the named user for which license units are being requested
    confirmTime - elapsed time (in seconds) whithin which the liscense system may expect the next confirm.
    units - number of license units to be requested
    forceNumber - whether or not a lower number of license units than that specified should be granted
    authenticationToken - a 32-bit arbitrary value created by the application and used as part of the licensing system authentication process
    Returns:
    number of license units granted
    Throws: CommunicationException
    if a communication error occurs between the license client and the license server
    Throws: InvalidParameterException
    if a parameter passed to a method is invalid
    Throws: LicenseCertificateException
    if the requested method cannot be completed on any license crtificate
    Throws: LicenseClientException
    if a generic license client error occurs
    Throws: ResourceUnavailableException
    if a resource required to execute the requested method is not available

    Class org.opengroup.xslm.LicenseUseManagement

    java.lang.Object
       |
       +----org.opengroup.xslm.LicenseUseManagement

    public final class LicenseUseManagement
    extends Object
    This class centralizes all License Use Management properties and common methods. One of its primary uses is to manage License System Publishers.

    Method Index
     
    addPublisher(Publisher)
    Adds a publisher to the next position available.
    getProperty(String)
    Gets a licenseUseManagement property.
    getPublisher(String)
    Returns the publisher installed with the specified name, if any.
    getPublishers()
    Returns all publishers currently installed.
    insertPublisherAt(Publisher, int)
    Adds a new publisher, at a specified position.
    removePublisher(String)
    Removes the publisher with the specified name.
    setProperty(String, String)
    Sets a licenseUseManagement property.

    Methods

  • insertPublisherAt
  • public static int insertPublisherAt(Publisher publisher,
                                       int position)
    Adds a new publisher, at a specified position. The position is the preference order in which publishers are chosen when no specific publisher is requested. Note that it is not guaranteed that this preference will be respected. The position is 1-based, that is, 1 is most preferred, followed by 2, and so on. Sometimes it will be legal to add a publisher, but only in the last position, in which case the position argument will be ignored.
    A publisher cannot be added if it is already installed.
    Parameters:
    publisher - the publisher to be added.
    position - the preference position that the caller would like for this publisher.
    Returns:
    the actual preference position in which the publisher was added, or -1 if the publisher was not added because it is already installed.
    See Also:
    getPublisher, removePublisher

  • addPublisher

    public static int addPublisher(Publisher publisher)
    Adds a publisher to the next position available.
    Parameters:
    publisher - the publisher to be added.
    Returns:
    the preference position in which the publisher was added, or -1 if the publisher was not added because it is already installed.
    See Also:
    getPublisher, removePublisher

  • removePublisher

    public static void removePublisher(String name)
    Removes the publisher with the specified name. This method returns silently if the publisher is not installed.
    Parameters:
    name - the name of the publisher to remove.
    See Also:
    getPublisher, addPublisher

  • getPublishers

    public static Publisher[] getPublishers()
    Returns all publishers currently installed.
    Returns:
    an array of all publishers currently installed.

  • getPublisher

    public static Publisher getPublisher(String name)
    Returns the publisher installed with the specified name, if any. Returns null if no publisher with the speicified name is installed.
    Parameters:
    name - the name of the publisher to get.
    Returns:
    the publisher of the specified name.
    See Also:
    removePublisher, addPublisher

  • getProperty

    public static String getProperty(String key)
    Gets a licenseUseManagement property.
    Parameters:
    key - the key of the property being retrieved.
    Returns:
    the value of the licenseUseManagement property corresponding to key.

  • setProperty

    public static void setProperty(String key,
                                  String datum)
    Sets a licenseUseManagement property.
    Parameters:
    key - the name of the property to be set.
    datum - the value of the property to be set.

    Class org.opengroup.xslm.Publisher

    java.lang.Object
       |
       +----java.util.Dictionary
               |
               +----java.util.Hashtable
                       |
                       +----java.util.Properties
                               |
                               +----org.opengroup.xslm.Publisher

    public abstract class Publisher
    extends Properties This class represents a "License System Publisher", publisher for short, for the Java XSLM API. A Publisher implements the Base functional set of Java XSLM and some or all functional towers.
    Each Publisher has a name and a version number, and is configured in each runtime it is installed in.

    Constructor Index
     
    Publisher(String, double, String)
    Constructs a Publisher with the specified name, version number, and information.
    getInfo()
    Returns a human-readable description of the publisher and its services.
    getName()
    Returns the name of this publisher.
    getVersion()
    Returns the version number for this publisher.
    toString()
    Returns a string with the name and the version number of this publisher.

    Constructors

    Publisher

    protected Publisher(String name,
                       double version,
                       String info)
    Constructs a Publisher with the specified name, version number, and information.
    Parameters:
    name - the publisher name.
    version - the publisher version number.
    info - a description of the publisher and its services.

    Methods

  • getName

    public String getName()

    Returns the name of this publisher.
    Returns:
    the name of this publisher.

  • getVersion

    public double getVersion()
    Returns the version number for this publisher.
    Returns:
    the version number for this publisher.

  • getInfo

    public String getInfo()
    Returns a human-readable description of the publisher and its services. This may return an HTML page, with relevant links.
    Returns:
    a description of the publisher and its services.

  • toString

    public String toString()
    Returns a string with the name and the version number of this publisher.
    Returns:
    the string with the name and the version number for this publisher.
    Overrides:
    toString in class Hashtable

    Class org.opengroup.xslm.Session

    java.lang.Object
       |
       +----org.opengroup.xslm.Session

    public abstract class Session
    extends Object This Session class is used to establish a reference which is used to keep track of composite licensing activities as a whole. A session may include licenses for products from one or more publishers.
    Like other classes in org.opengroup.xslm, the Session class has two major components:
    Session API (Application Program Interface)
    This is the interface of methods called by applications needing session objects to call the AdvancedApplicationClient methods. The API consists of all public methods.
    Session SPI (Service Provider Interface)
    This is the interface implemented by licensing system publishers that supply specific license use management packages. It consists of all methods whose names are prefixed by engine. Each such method is called by a correspondingly-named public API method. For example, the engineEnd method is called by the end method. The SPI methods are abstract; publishers must supply a concrete implementation.

    Also Session provides implementation-independent objects, whereby a caller (application code) requests just a session object and is handed back a properly initialized Session object to be used with a AdvancedApplicationClient provided by a LicenseBroker. It is also possible, if desired, to request a particular implementation of a session object from a particular publisher to be used with a AdvancedApplicationClient provided by a LicenseAgent. See the getInstance methods.

    Thus, there are two ways to request a Session object: by not specifying any parameter, or by specifying a package publisher.

    If no parameter is specified, the system will determine if there is an implementation of the requested session object available in the environment, and if there is more than one, if there is a preferred one.

    If a package publisher is specified, the system will determine if there is an implementation of the session object in the package requested, and throw an exception if there is not.


    Variable Index
     
    STARTED
    Possible state value, signifying that this session object has been started.
    state
    Current state of this session object.
    STOPPED
    Possible state value, signifying that this session object has been stopped.
    UNINITIALIZED
    Possible state value, signifying that this session object has not yet been initialized.
     
    Constructor Index
     
    Session()
    Creates a Session object.
     
    Method Index
     
    begin()
    Starts a session to keep track of composite licensing activity
    end()
    Terminates a session established by a begin method invocation
    engineBegin()
    SPI: Starts a session to keep track of composite licensing activity
    engineEnd()
    SPI: Terminates a session established by a engineBegin method invocation
    getHandle()
    Returns the handle of this session object.
    getInstance()
    Generates a Session object.
    getInstance(String)
    Generates a Session object as supplied from the specified publisher, if a Session subclass is available from the provider.

    Variables

    UNINITIALIZED

    protected static final int UNINITIALIZED
    Possible state value, signifying that this session object has not yet been initialized.

    STARTED

    protected static final int STARTED
    Possible state value, signifying that this session object has been started.

    STOPPED

    protected static final int STOPPED
    Possible state value, signifying that this session object has been stopped.

    state

    protected int state
    Current state of this session object.

    Constructors

    Session

    protected Session()
    Creates a Session object.

    Methods

  • getInstance

    public static Session getInstance()
    throws NoSuchAPILevelException

    Generates a Session object. Packages are searched until one implementing a Session object is found and an instance of that subclass is returned.
    Returns:
    the new Session object.
    Throws: NoSuchAPILevelException
    if an implementation for the Session class is not available in the environment

  • getInstance

    public static Session getInstance(String publisher) 
     throws NoSuchPublisherException, NoSuchAPILevelException
    Generates a Session object as supplied from the specified publisher, if a Session subclass is available from the provider.
    Parameters:
    publisher - the name of the publisher.
    Returns:
    the new Session object.
    Throws: NoSuchAPILevelException
    if the Session subclass is not available in the package supplied by the requested publisher.
    Throws: NoSuchPublisherException
    if the publisher is not available in the environment.
    See Also:
    Publisher

  • begin

    public final void begin()
    Starts a session to keep track of composite licensing activity

  • end

    public final void end()
    Terminates a session established by a begin method invocation

  • getHandle

    public final String getHandle()
    Returns the handle of this session object.
    Returns:
    the handle of this session object.

  • engineBegin

    protected abstract void engineBegin()
    SPI: Starts a session to keep track of composite licensing activity

  • engineEnd

    protected abstract void engineEnd()
    SPI: Terminates a session established by a engineBegin method invocation

    Class org.opengroup.xslm.CommunicationException

    java.lang.Object
       |
       +----java.lang.Throwable
               |
               +----java.lang.Exception
                       |
                       +----org.opengroup.xslm.CommunicationException

    public class CommunicationException
    extends Exception This exception is thrown when a communication error occurrs between the LicenseAgent and a license server.

    Constructors Index
     
    CommunicationException()
    Constructs a CommunicationException with no detail message.
    CommunicationException(String)
    Constructs a CommunicationException with the specified detail message.

    Constructors

  • CommunicationException

    public CommunicationException()
    Constructs a CommunicationException with no detail message. A detail message is a String that describes this particular exception.

  • CommunicationException

    public CommunicationException(String msg)
    Constructs a CommunicationException with the specified detail message. A detail message is a String that describes this particular exception.
    Parameters:
    msg - the detail message.

    Class org.opengroup.xslm.InvalidParameterException

    java.lang.Object
       |
       +----java.lang.Throwable
               |
               +----java.lang.Exception
                       |
                       +----java.lang.RuntimeException
                               |
                               +----java.lang.IllegalArgumentException
                                       |
                                       +----org.opengroup.xslm.InvalidParameterException

    public class InvalidParameterException
    extends IllegalArgumentException This exception is thrown when an invalid parameter is passed to a method.

    Constructor Index
     
    InvalidParameterException()
    Constructs an InvalidParameterException with no detail message.
    InvalidParameterException(String)
    Constructs an InvalidParameterException with the specified detail message.

    Constructors

  • InvalidParameterException

    public InvalidParameterException()
    Constructs an InvalidParameterException with no detail message. A detail message is a String that describes this particular exception.

  • InvalidParameterException

     public InvalidParameterException(String msg)
    Constructs an InvalidParameterException with the specified detail message. A detail message is a String that describes this particular exception.
    Parameters:
    msg - the detail message.

    Class org.opengroup.xslm.LicenseCertificateException

    java.lang.Object
       |
       +----java.lang.Throwable
               |
               +----java.lang.Exception
                       |
                       +----org.opengroup.xslm.LicenseCertificateException

    public class LicenseCertificateException
    extends Exception This exception is thrown when the requested method cannot be completed on any of the license certificates available, or to a particular license certificate if the application client is already bound to one.

    Constructor Index
     
    LicenseCertificateException()
    Constructs a LicenseCertificateException with no detail message.
    LicenseCertificateException(String)
    Constructs a LicenseCertificateException with the specified detail message.

    Constructors

  • LicenseCertificateException

    public LicenseCertificateException()
    Constructs a LicenseCertificateException with no detail message. A detail message is a String that describes this particular exception.

  • LicenseCertificateException

    public LicenseCertificateException(String msg)
    Constructs a LicenseCertificateException with the specified detail message. A detail message is a String that describes this particular exception.
    Parameters:
    msg - the detail message.

    Class org.opengroup.xslm.LicenseClientException

    java.lang.Object
       |
       +----java.lang.Throwable
               |
               +----java.lang.Exception
                       |
                       +----org.opengroup.xslm.LicenseClientException

    public class LicenseClientException
    extends Exception This exception is thrown when a generic AdvancedApplicationClient or BasicApplicationClient error occurs, as when a releaseLicense method is called before calling a requestLicense method.

    Constructor Index
     
    LicenseClientException()
    Constructs a LicenseClientException with no detail message.
    LicenseClientException(String)
    Constructs a LicenseClientException with the specified detail message.

    Constructors

  • LicenseClientException

    public LicenseClientException()
    Constructs a LicenseClientException with no detail message. A detail message is a String that describes this particular exception.

  • LicenseClientException

    public LicenseClientException(String msg)
    Constructs a LicenseClientException with the specified detail message. A detail message is a String that describes this particular exception.
    Parameters:
    msg - the detail message.

    Class org.opengroup.xslm.NoSuchAPILevelException

    
    java.lang.Object
       |
       +----java.lang.Throwable
               |
               +----java.lang.Exception
                       |
                       +----org.opengroup.xslm.NoSuchAPILevelException

    public class NoSuchAPILevelException
    extends Exception This exception is thrown when the requested API level is not available in the environment.

    Constructor Index
     
    NoSuchAPILevelException()
    Constructs a NoSuchAPILevelException with no detail message.
    NoSuchAPILevelException(String)
    Constructs a NoSuchAPILevelException with the specified detail message.

    Constructors

  • NoSuchAPILevelException

    public NoSuchAPILevelException()
    Constructs a NoSuchAPILevelException with no detail message. A detail message is a String that describes this particular exception.

  • NoSuchAPILevelException

    public NoSuchAPILevelException(String msg)
    Constructs a NoSuchAPILevelException with the specified detail message. A detail message is a String that describes this particular exception.
    Parameters:
    msg - the detail message.

    Class org.opengroup.xslm.NoSuchPublisherException

    java.lang.Object
       |
       +----java.lang.Throwable
               |
               +----java.lang.Exception
                       |
                       +----org.opengroup.xslm.NoSuchPublisherException

    public class NoSuchPublisherException
    extends Exception This exception is thrown when a particular License System Publisher is requested but is not available in the environment.

    Constructor Index
     
    NoSuchPublisherException()
    Constructs a NoSuchPublisherException with no detail message.
    NoSuchPublisherException(String)
    Constructs a NoSuchPublisherException with the specified detail message.

    Constructors

  • NoSuchPublisherException

    public NoSuchPublisherException()
    Constructs a NoSuchPublisherException with no detail message. A detail message is a String that describes this particular exception.

  • NoSuchPublisherException

    public NoSuchPublisherException(String msg)
    Constructs a NoSuchPublisherException with the specified detail message. A detail message is a String that describes this particular exception.
    Parameters:
    msg - the detail message.

    Class org.opengroup.xslm.ResourceUnavailableException

    java.lang.Object
       |
       +----java.lang.Throwable
               |
               +----java.lang.Exception
                       |
                       +----org.opengroup.xslm.ResourceUnavailableException

    public class ResourceUnavailableException
    extends Exception This exception is thrown when a resource required to execute the requestedp method is not available in the environment.

    Constructor Index
     
    ResourceUnavailableException()
    Constructs a ResourceUnavailableException with no detail message.
    ResourceUnavailableException(String)
    Constructs a ResourceUnavailableException with the specified detail message.

    Constructors

  • ResourceUnavailableException

    public ResourceUnavailableException()
    Constructs a ResourceUnavailableException with no detail message. A detail message is a String that describes this particular exception.

  • ResourceUnavailableException

    ailableException(String msg)
    Constructs a ResourceUnavailableException with the specified detail message. A detail message is a String that describes this particular exception.
    Parameters:
    msg - the detail message.



    Why not acquire a nicely bound hard copy?
    Click here to return to the publication details or order a copy of this publication.

    Contents Next section Index