Class CachingProfileService
java.lang.Object
com.gamersafer.minecraft.auth.common.service.impl.profile.CachingProfileService
- All Implemented Interfaces:
IProfileService
-
Constructor Summary
ConstructorsConstructorDescriptionCachingProfileService(IGamerSaferMinecraftJavaUserAPI javaUserService, int cacheMinutes) -
Method Summary
Modifier and TypeMethodDescriptionvoidevict(UserIdentity user) Removes the user from the cache.voidevictRetention(Set<UserIdentity> onlinePlayers) Refreshes player data access times so that they do not get evicted.booleangetLoginConfirmation(UserIdentity identity) booleanhasLoginConfirmation(UserIdentity identity) Submits a guild invite requestlogUserLogin(String guildMemberId, UserIdentity identity) Logs a user login in the API.voidshutdown()Properly shuts down the service.startLoginProcess(UserIdentity identity, LoginHandler loginHandler, boolean forceVerify) submitLogReport(ReportLog log) Submits theLogReportto the API.Test the connection to the APISubmits a guild member verification requestMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.gamersafer.minecraft.auth.common.service.IProfileService
startLoginProcess
-
Constructor Details
-
CachingProfileService
-
-
Method Details
-
evictRetention
Description copied from interface:IProfileServiceRefreshes player data access times so that they do not get evicted.- Specified by:
evictRetentionin interfaceIProfileService- Parameters:
onlinePlayers- a set ofUserIdentitythat should NOT be evicted
-
testConnection
Description copied from interface:IProfileServiceTest the connection to the API- Specified by:
testConnectionin interfaceIProfileService- Returns:
- whether the connection to the API was successful
-
submitLogReport
Description copied from interface:IProfileServiceSubmits theLogReportto the API.- Specified by:
submitLogReportin interfaceIProfileService- Parameters:
log- theLogReport- Returns:
- a CompletableFuture indicating submission success
-
invite
Description copied from interface:IProfileServiceSubmits a guild invite request- Specified by:
invitein interfaceIProfileService- Parameters:
uuid- the GamerSafer guild member id- Returns:
- a QR code image in Data-URI format, or null the player does not have a GamerSafer account, the request timed out/failed
-
verify
Description copied from interface:IProfileServiceSubmits a guild member verification request- Specified by:
verifyin interfaceIProfileService- Parameters:
guildMemberId- the GamerSafer guild member id- Returns:
- the verification id of the verification
-
shutdown
public void shutdown()Description copied from interface:IProfileServiceProperly shuts down the service.- Specified by:
shutdownin interfaceIProfileService