Class ModalServiceBuilder
java.lang.Object
de.chojo.jdautil.modals.service.ModalServiceBuilder
- All Implemented Interfaces:
ModalServiceModifier
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds and registers the service at the providedShardManager.setCache(com.google.common.cache.Cache<String, ModalHandler> cache) Set the cache implementation for the modal serviceModifies a provided cache builder instance.withLocalizer(ILocalizer localizer) Set theILocalizerfor theModalService.
-
Constructor Details
-
ModalServiceBuilder
-
-
Method Details
-
withLocalizer
Description copied from interface:ModalServiceModifierSet theILocalizerfor theModalService. This is not required when the service is linked to aInteractionHub.- Specified by:
withLocalizerin interfaceModalServiceModifier- Parameters:
localizer- localizer instance- Returns:
- builder instance
-
setCache
Description copied from interface:ModalServiceModifierSet the cache implementation for the modal service- Specified by:
setCachein interfaceModalServiceModifier- Parameters:
cache- cache- Returns:
- builder instance
-
withCache
public ModalServiceBuilder withCache(Consumer<com.google.common.cache.CacheBuilder<Object, Object>> cache) Description copied from interface:ModalServiceModifierModifies a provided cache builder instance.- Specified by:
withCachein interfaceModalServiceModifier- Parameters:
cache- cache- Returns:
- builder instance
-
build
Builds and registers the service at the providedShardManager.- Returns:
- a new modal service instance
-