com.antelmann.util
Class LicenseLoader
java.lang.Object
com.antelmann.util.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 upcoming 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 inevidable.
- Author:
- Holger Antelmann
- See Also:
Settings.setLicenseHandler(LicenseHandler),
Settings.checkLicense(Object),
LicensingException
|
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 |
LicenseLoader
public LicenseLoader(URL... url)
LicenseLoader
public LicenseLoader(Collection<URL> col)
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 licensele - the exception that was raised by the LicenseManagerc - 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) 2001-2006 Holger Antelmann - all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads