|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ILicense
(CLIENT) Provides methods for acquiring and releasing server licenses.
For this service to be active, it must be compiled into the
server jar file via server/build.xml and the
omero.hard-wired.interceptor configuration property.
Each LicenseStore
implementation will behave
differently, but in general it is intended that users will
have to acquire a license (represented by a byte-array
license token) which must be presented on all method calls
to non-ILicense
services. This is enforced by
LicenseWiring
, the HardWiredInterceptor
implementation which will be compiled in.
LicenseStore
,
LicenseWiring
Method Summary | |
---|---|
byte[] |
acquireLicense()
Reserves a license for the current user. |
long |
getAvailableLicenseCount()
Returns the number of licenses which can currently be acquired . |
long |
getLicenseTimeout()
Returns the timeout per license as interpreted by the LicenseStore implementation. |
long |
getTotalLicenseCount()
Returns the total number of licenses which the server has. |
boolean |
releaseLicense(byte[] token)
Frees a license for re-reservation via acquireLicense() . |
void |
resetLicenses()
Administrative method to clear all active licenses and possibly to re-initialize the LicenseStore . |
Method Detail |
---|
long getAvailableLicenseCount()
acquired
. There is no guarantee
that the number will remain constant before the next
call, and therefore clients should be prepared to handle
exceptions
during acquisition.
No guarantee is given on the interpretation of licenses
used. Refer to the LicenseStore
implementation
for more details. For example, a power-user may consume
more than one license per acquisition.
long getTotalLicenseCount()
resetLicenses()
long getLicenseTimeout()
LicenseStore
implementation. Please refer there
for more information.
byte[] acquireLicense()
LicenseWiring
interceptor is in effect.
Licenses may timeout depending on the LicenseStore
implementation. Clients should be ready to handle
exceptions
on any method call.
Licenses should also be released
when possible so that other users can access the server.
boolean releaseLicense(byte[] token)
acquireLicense()
.
If the license is invalid, no exception is thrown, but rather a
false
value returned.
void resetLicenses()
LicenseStore
. This
may include a change to the internal settings such as
license count
or
timeout
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Version: Beta-4.2.0-r7571-b29
Copyright © 2009 The University of Dundee. All Rights Reserved.