public class HookHandlerServiceImpl extends java.lang.Object implements HookHandlerService
PRIORITY_HIGH, PRIORITY_LOW, PRIORITY_LOWER, PRIORITY_MEDIUM
Constructor and Description |
---|
HookHandlerServiceImpl(<any> mapProvider) |
Modifier and Type | Method and Description |
---|---|
<H extends Hook> |
attachHooker(java.lang.Class<? extends H> hook,
<any> hookerProvider)
Attaches the given hooker to the given
Hook with a priority of
PRIORITY_MEDIUM |
<H extends Hook> |
attachHooker(java.lang.Class<? extends H> hook,
<any> hookerProvider,
int priority)
Attaches the given hooker to the given
Hook with the given priority |
static HookHandlerServiceImpl |
createInstance() |
<H extends Hook> |
detachHooker(java.lang.Class<? extends H> hook,
<any> hookerProvider)
Detaches the given hooker from the hook
|
HookConfiguration |
getConfig(java.lang.Class<? extends Hook> hook) |
<H extends Hook> |
getHookers(java.lang.Class<? extends H> hook)
Returns a
List of all hookers which are attached to the given hook. |
<H extends Hook> |
getRawHookerProviders(java.lang.Class<? extends H> hook) |
<H extends Hook> |
getRawHookers(java.lang.Class<? extends H> hook) |
void |
setConfig(HookConfiguration config) |
public static HookHandlerServiceImpl createInstance()
public <H extends Hook> void attachHooker(java.lang.Class<? extends H> hook, <any> hookerProvider)
HookHandlerService
Hook
with a priority of
PRIORITY_MEDIUMattachHooker
in interface HookHandlerService
H
- can be any type extending Hook
hook
- The hook to connect the hooker tohookerProvider
- The hookerpublic <H extends Hook> void attachHooker(java.lang.Class<? extends H> hook, <any> hookerProvider, int priority)
HookHandlerService
Hook
with the given priorityattachHooker
in interface HookHandlerService
H
- can be any type extending Hook
hook
- The hook to connect the hooker tohookerProvider
- The hookerpriority
- The prioritypublic <H extends Hook> void detachHooker(java.lang.Class<? extends H> hook, <any> hookerProvider)
HookHandlerService
detachHooker
in interface HookHandlerService
H
- can be any type extending Hook
public <H extends Hook> java.util.List<<any>> getRawHookerProviders(java.lang.Class<? extends H> hook)
getRawHookerProviders
in interface HookHandlerService
public <H extends Hook> java.util.List<H> getRawHookers(java.lang.Class<? extends H> hook)
getRawHookers
in interface HookHandlerService
public <H extends Hook> java.util.List<H> getHookers(java.lang.Class<? extends H> hook)
HookHandlerService
List
of all hookers which are attached to the given hook.getHookers
in interface HookHandlerService
H
- can be any type extending Hook
hook
- The Hook
to get the attached hookers frompublic HookConfiguration getConfig(java.lang.Class<? extends Hook> hook)
getConfig
in interface HookHandlerService
public void setConfig(HookConfiguration config)
setConfig
in interface HookHandlerService