Interface LicenceManager
-
- All Superinterfaces:
ADEPT2Service
public interface LicenceManager extends ADEPT2Service
The licence manager provides the licence information for all services and clients of the corresponding server. Additionally, it validates the licence. It is a service started very early in the bootstrapping process.
Services checking for violations can log them. However, not every violation stops the corresponding service. Violations will be checked every day, which may lead to a shutdown of the system.The licence information is retrieved from an external source when starting this licence manager.
-
-
Field Summary
Fields Modifier and Type Field Description static long
DAY
Deprecated.No longer required withjava.time
.static Locale
DEF_LOCALE
Deprecated.No longer required withjava.time
.static long
HOUR
Deprecated.No longer required withjava.time
.static Duration
MAXIMUM_ALLOWED_TIME_ADJUSTMENT
The amount of time the system clock may be adjusted backwards without being logged as violation.static long
MAXIMUM_TIMESHIFT_ALLOWED
Deprecated.UseMAXIMUM_ALLOWED_TIME_ADJUSTMENT
instead.static long
MINUTE
Deprecated.No longer required withjava.time
.static long
SECOND
Deprecated.No longer required withjava.time
.static int
TRANSACTION_TRACKING_DAYS
The amount of days transactions are tracked.static TimeZone
UTC_TZ
Deprecated.No longer required withjava.time
.static String
VIOLATION_KNOWN_USER_LIMIT_END
The event indicating that the violation of the known user limit has been ended (or has not started yet).static String
VIOLATION_KNOWN_USER_LIMIT_START
The event indicating that the violation of the known user limit has been started.static String
VIOLATION_TIME_INCONSISTENCY
The event indicating that a time inconsistency has occurred.static String
VIOLATION_TRANSACTION_LIMIT
The event indicating that the transaction limit has been violated.static String
VIOLATION_USING_USER_LIMIT_END
The event indicating that the violation of the using user limit has been ended.static String
VIOLATION_USING_USER_LIMIT_START
The event indicating that the violation of the using user limit has been started.
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description LicenceInformation
getLicenceInformation()
Gets the licence information that applies to the server and all of its services as well as the clients.LicenceInformation
getLicenceInformation(SessionToken session)
Deprecated.UsegetLicenceInformation()
instead.String
getSymbolicReleaseName()
Gets the symbolic name of the current release of the server and all of its services as well as the clients.long
getUTCMidnight(long now)
Deprecated.No longer required withjava.time
.boolean
logViolation(SessionToken session, String violationType, long violationValue)
Logs violations of the designated type with the designated value, for instance the number of users concurrently logged on.void
setViolationShutdown(SessionToken session, ADEPT2Service shutdownService)
Sets the designated service to be the one to be shut down in case of severe licence violations.-
Methods inherited from interface de.aristaflow.adept2.base.service.ADEPT2Service
getLocalUris, getRelease, getRuntimeRequiredServices, getServiceInstanceName, getStartupRequiredServices, getURIs, init, ping, preShutdown, shutdown, start
-
-
-
-
Field Detail
-
SECOND
@Deprecated static final long SECOND
Deprecated.No longer required withjava.time
.The amount of milliseconds for one second. *- See Also:
- Constant Field Values
-
MINUTE
@Deprecated static final long MINUTE
Deprecated.No longer required withjava.time
.The amount of milliseconds for one minute. *- See Also:
- Constant Field Values
-
HOUR
@Deprecated static final long HOUR
Deprecated.No longer required withjava.time
.The amount of milliseconds for one hour. *- See Also:
- Constant Field Values
-
DAY
@Deprecated static final long DAY
Deprecated.No longer required withjava.time
.The amount of milliseconds for one day.- See Also:
- Constant Field Values
-
TRANSACTION_TRACKING_DAYS
static final int TRANSACTION_TRACKING_DAYS
The amount of days transactions are tracked.- See Also:
- Constant Field Values
-
MAXIMUM_TIMESHIFT_ALLOWED
@Deprecated static final long MAXIMUM_TIMESHIFT_ALLOWED
Deprecated.UseMAXIMUM_ALLOWED_TIME_ADJUSTMENT
instead.The amount of time the system clock may be adjusted backwards without being logged as violation.- See Also:
- Constant Field Values
-
MAXIMUM_ALLOWED_TIME_ADJUSTMENT
static final Duration MAXIMUM_ALLOWED_TIME_ADJUSTMENT
The amount of time the system clock may be adjusted backwards without being logged as violation.
-
UTC_TZ
@Deprecated static final TimeZone UTC_TZ
Deprecated.No longer required withjava.time
.The UTC-time zone used for all licensing issues.
-
DEF_LOCALE
@Deprecated static final Locale DEF_LOCALE
Deprecated.No longer required withjava.time
.The default locale used for all licensing issues.
-
VIOLATION_KNOWN_USER_LIMIT_START
static final String VIOLATION_KNOWN_USER_LIMIT_START
The event indicating that the violation of the known user limit has been started.- See Also:
- Constant Field Values
-
VIOLATION_KNOWN_USER_LIMIT_END
static final String VIOLATION_KNOWN_USER_LIMIT_END
The event indicating that the violation of the known user limit has been ended (or has not started yet).- See Also:
- Constant Field Values
-
VIOLATION_USING_USER_LIMIT_START
static final String VIOLATION_USING_USER_LIMIT_START
The event indicating that the violation of the using user limit has been started.- See Also:
- Constant Field Values
-
VIOLATION_USING_USER_LIMIT_END
static final String VIOLATION_USING_USER_LIMIT_END
The event indicating that the violation of the using user limit has been ended.- See Also:
- Constant Field Values
-
VIOLATION_TRANSACTION_LIMIT
static final String VIOLATION_TRANSACTION_LIMIT
The event indicating that the transaction limit has been violated.- See Also:
- Constant Field Values
-
VIOLATION_TIME_INCONSISTENCY
static final String VIOLATION_TIME_INCONSISTENCY
The event indicating that a time inconsistency has occurred.- See Also:
- Constant Field Values
-
-
Method Detail
-
getSymbolicReleaseName
String getSymbolicReleaseName()
Gets the symbolic name of the current release of the server and all of its services as well as the clients.- Returns:
- The symbolic name of the current release of the server and all of its services as well as the clients.
-
getLicenceInformation
LicenceInformation getLicenceInformation()
Gets the licence information that applies to the server and all of its services as well as the clients.- Returns:
- The licence information that applies to the server and all of its services as well as the clients.
-
getLicenceInformation
@Deprecated LicenceInformation getLicenceInformation(SessionToken session)
Deprecated.UsegetLicenceInformation()
instead.Gets the licence information that applies to the server and all of its services as well as the clients.- Parameters:
session
- The session which is used to check for access rights on this method.- Returns:
- The licence information that applies to the server and all of its services as well as the clients.
-
logViolation
boolean logViolation(SessionToken session, String violationType, long violationValue)
Logs violations of the designated type with the designated value, for instance the number of users concurrently logged on. This does not necessarily stop the checking service; this depends on the severity of the violation.- Parameters:
session
- The session which is used to check for access rights on this method and to retrieve the logging component.violationType
- The type of the violation to be logged.violationValue
- A value for the designated violation type for instance the number users concurrently logged on.- Returns:
- Whether the violation is so severe that the logging service should stop immediately.
-
getUTCMidnight
@Deprecated long getUTCMidnight(long now)
Deprecated.No longer required withjava.time
.Gets the time (in milliseconds) of midnight UTC of the day specified by the designated time (in milliseconds).- Parameters:
now
- The time in milliseconds of which to retrieve the corresponding previous midnight time UTC.- Returns:
- The midnight time UTC of the designated time.
-
setViolationShutdown
void setViolationShutdown(SessionToken session, ADEPT2Service shutdownService)
Sets the designated service to be the one to be shut down in case of severe licence violations.- Parameters:
session
- The session which is used to check for access rights on this method and to retrieve the setting component.shutdownService
- The service to be shut down as soon as this licence manager detects a severe licence violation.
-
-