Package page.codeberg.friedolyn
Class Friedolyn.BannedUserCallback
java.lang.Object
page.codeberg.friedolyn.Friedolyn.BannedUserCallback
- All Implemented Interfaces:
PolledMetadata.BannedUserCallback
- Enclosing class:
Friedolyn
public class Friedolyn.BannedUserCallback
extends Object
implements PolledMetadata.BannedUserCallback
A callback that is to be called as soon as the currently logged-in user has been identified as banned from using
Friedolyn.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
Is to be called as soon as the currently logged-in user has been identified as banned from using Friedolyn.void
onBansFound
(@NonNull Set<BanLevel> banLevels) Is to be called as soon as the currently logged-in user has been identified as banned from using Friedolyn.void
onBansFound
(@NonNull Set<BanLevel> banLevels, @NonNull String message) Is to be called as soon as the currently logged-in user has been identified as banned from using Friedolyn.private void
Makes the Java Virtual Machine (JVM) shut down the Friedolyn application, i.e.
-
Field Details
-
banLevels
-
message
An explanation from the developers to the user banned about why they were banned and what this means for them.
-
-
Constructor Details
-
BannedUserCallback
public BannedUserCallback()
-
-
Method Details
-
onBansFound
Is to be called as soon as the currently logged-in user has been identified as banned from using Friedolyn. Alerts the user about the bans and stops those features that the user is banned from using. If the user is banned from usingeverything
, the application will be stopped entirely, as soon as the alert popup is closed.- Specified by:
onBansFound
in interfacePolledMetadata.BannedUserCallback
- Parameters:
banLevels
- All application features that the user is banned from using. Must not be empty.- Throws:
IllegalArgumentException
- If the set of ban levels is empty.- See Also:
-
onBansFound
public void onBansFound(@NonNull @NonNull Set<BanLevel> banLevels, @NonNull @NonNull String message) throws IllegalArgumentException Is to be called as soon as the currently logged-in user has been identified as banned from using Friedolyn. Alerts the user about the bans and stops those features that the user is banned from using. If the user is banned from usingeverything
, the application will be stopped entirely, as soon as the alert popup is closed.- Specified by:
onBansFound
in interfacePolledMetadata.BannedUserCallback
- Parameters:
banLevels
- All application features that the user is banned from using. Must not be empty.message
- An explanation from the developers to the user banned about why they were banned and what this means for them. Must not be empty. UseonBansFound(Set)
instead if no message was provided.- Throws:
IllegalArgumentException
- If the set of ban levels is empty or if the message is empty.- See Also:
-
onBansFound
Is to be called as soon as the currently logged-in user has been identified as banned from using Friedolyn. Alerts the user about the bans and stops those features that the user is banned from using. If the user is banned from usingeverything
, the application will be stopped entirely, as soon as the alert popup is closed.- Throws:
IllegalArgumentException
- If the set of ban levels is empty.
-
terminate
private void terminate()Makes the Java Virtual Machine (JVM) shut down the Friedolyn application, i.e. stop the program completely.
-