Class HookHandlerServiceImpl
java.lang.Object
net.datenwerke.hookhandler.shared.hookhandler.HookHandlerServiceImpl
- All Implemented Interfaces:
HookHandlerService
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
-
Field Summary
Fields inherited from interface net.datenwerke.hookhandler.shared.hookhandler.HookHandlerService
PRIORITY_HIGH, PRIORITY_LOW, PRIORITY_LOWER, PRIORITY_MEDIUM -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<H extends Hook>
voidattachHooker(Class<? extends H> hook, <any> hookerProvider) Attaches the given hooker to the givenHookwith a priority of PRIORITY_MEDIUM<H extends Hook>
voidattachHooker(Class<? extends H> hook, <any> hookerProvider, int priority) Attaches the given hooker to the givenHookwith the given prioritystatic HookHandlerServiceImpl<H extends Hook>
voiddetachHooker(Class<? extends H> hook, <any> hookerProvider) Detaches the given hooker from the hookgetHookers(Class<? extends H> hook) Returns aListof all hookers which are attached to the given hook.getRawHookerProviders(Class<? extends H> hook) getRawHookers(Class<? extends H> hook) voidsetConfig(HookConfiguration config)
-
Constructor Details
-
HookHandlerServiceImpl
public HookHandlerServiceImpl(<any> mapProvider)
-
-
Method Details
-
createInstance
-
attachHooker
Description copied from interface:HookHandlerServiceAttaches the given hooker to the givenHookwith a priority of PRIORITY_MEDIUM- Specified by:
attachHookerin interfaceHookHandlerService- Type Parameters:
H- can be any type extendingHook- Parameters:
hook- The hook to connect the hooker tohookerProvider- The hooker
-
attachHooker
public <H extends Hook> void attachHooker(Class<? extends H> hook, <any> hookerProvider, int priority) Description copied from interface:HookHandlerServiceAttaches the given hooker to the givenHookwith the given priority- Specified by:
attachHookerin interfaceHookHandlerService- Type Parameters:
H- can be any type extendingHook- Parameters:
hook- The hook to connect the hooker tohookerProvider- The hookerpriority- The priority
-
detachHooker
Description copied from interface:HookHandlerServiceDetaches the given hooker from the hook- Specified by:
detachHookerin interfaceHookHandlerService- Type Parameters:
H- can be any type extendingHook- Parameters:
hook-hookerProvider-
-
getRawHookerProviders
- Specified by:
getRawHookerProvidersin interfaceHookHandlerService
-
getRawHookers
- Specified by:
getRawHookersin interfaceHookHandlerService
-
getHookers
Description copied from interface:HookHandlerServiceReturns aListof all hookers which are attached to the given hook.- Specified by:
getHookersin interfaceHookHandlerService- Type Parameters:
H- can be any type extendingHook- Parameters:
hook- TheHookto get the attached hookers from
-
getConfig
- Specified by:
getConfigin interfaceHookHandlerService
-