Holger's Java API

## com.antelmann
Class LicenseLoader

    java.lang.Object
      com.antelmann.LicenseLoader

All Implemented Interfaces:
  LicenseHandler

    public class LicenseLoader

extends Object
implements LicenseHandler

can be used to acquire licenses from a known location on demand. The LicenseLoader can be initialized to first check a list of URLs to be loaded to acquire the needed license. Only if that fails (or if no URLs were configured to begin with), an up-coming dialog will enable the user to provide a location from where a final attempt is made to load the required license. If that last resort fails, too, a LicensingException to be thrown may be inevitable.

Author:
  Holger Antelmann
See Also:
  `Settings.setLicenseHandler(LicenseHandler)`, `Settings.checkLicense(Object)`, `LicensingException`

Constructor Summary
`LicenseLoader(Collection<URL> col)`
`LicenseLoader(URL... url)`

Method Summary
`void` `acquireLicense(Object licensee, LicensingException le, Component c)` first checks the already known locations and tries to acquire a license from there; if that fails, a user dialog appears - allowing to choose another location.
`Vector<URL>` `getLocations()` these URLs will be used to acquire licenses on demand before user interaction may be required.

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

Constructor Detail

### LicenseLoader

    public LicenseLoader(URL... url)

### LicenseLoader

    public LicenseLoader(Collection<URL> col)

Method Detail

### getLocations

    public Vector<URL> getLocations()

  these URLs will be used to acquire licenses on demand before user interaction may be required.

### acquireLicense

    public void acquireLicense(Object licensee,
                               LicensingException le,
                               Component c)

  first checks the already known locations and tries to acquire a license from there; if that fails, a user dialog appears - allowing to choose another location.

  Specified by:
    `acquireLicense` in interface `LicenseHandler`
  Parameters:
    `licensee` - the object that requested the license
    `le` - the exception that was raised by the LicenseManager
    `c` - the component (which may be null) that can be used to put dialogs on top of it.
  See Also:
    `Settings.checkLicense(Object)`, `Settings.checkLicense(Object, Component)`, `LicenseManager`

(c) Holger Antelmann since 2001- all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads