Interface LicenseFacility


  • public interface LicenseFacility

    Licensing methods available to Resource Adaptor entities.

    • Field Detail

      • JNDI_NAME

        static final String JNDI_NAME

        Constant declaring the JNDI name where a LicenseFacility object is bound into an SBB’s JNDI environment.

        The value of this constant is "java:comp/env/rhino/facilities/license".

        See Also:
        Constant Field Values
    • Method Detail

      • getSchema

        @Deprecated
        String getSchema()
        Deprecated.

        Get the optional licensing schema specified in the license deployment descriptor.

        Returns:
        the licensing schema, or null if none has been specified.
      • isLicensed

        boolean isLicensed​(String function)

        Determine if a valid license is available in Rhino for a given license function (with any version).

        Note that the given license function does not have to have been specified in the license deployment descriptor - this method can be used to check for the presence of a valid license for any license function.

        Parameters:
        function - the license function.
        Returns:
        true if a valid license exists in Rhino for the specified license function, false otherwise.
      • isLicensed

        boolean isLicensed​(String function,
                           String version)

        Determine if a valid license is available in Rhino for a given license function/version pair.

        Note that the given license function does not have to have been specified in the license deployment descriptor - this method can be used to check for the presence of a valid license for any license function.

        Parameters:
        function - the license function.
        Returns:
        true if a valid license exists in Rhino for the specified license function, false otherwise.
      • useOneUnit

        void useOneUnit​(String function)
                 throws FunctionNotFoundException

        Consume one unit of a license function.

        This method can only be used against license functions that have been specified in the license deployment descriptor.

        Parameters:
        function - the license function.
        Throws:
        FunctionNotFoundException - if the specified function has not been specified in the license deployment descriptor.
      • getSigningCertificates

        Set<Certificate> getSigningCertificates()

        Returns the list of certificates which fully sign the deployable unit containing this component. This can be used to check whether the containing DU has been modified (e.g. to check that the DU is still signed, check that your signing certificate exists in the returned set.