public class PluginLifecycleEventManager extends Object
Modifier and Type | Method and Description |
---|---|
static <TPlugin extends IFCPlugin> |
deregisterListener(EPluginLifecycleEvent event,
Class<TPlugin> pluginType,
IPluginLifecycleListener<TPlugin> listener)
Deregisters a listener for a plugin event and a certain plugin type.
|
static void |
deregisterListeners()
Deregisters all listeners.
|
static void |
deregisterListeners(EPluginLifecycleEvent event)
Deregisters all listeners for a plugin event.
|
static void |
deregisterListeners(EPluginLifecycleEvent event,
Class<? extends IFCPlugin> pluginType)
Deregisters all listeners for a plugin event and a certain plugin type.
|
static void |
fireEvent(EPluginLifecycleEvent event,
PluginRuntime pluginRuntime,
IFCPlugin plugin)
Calls all registered events listeners for the given event.
|
static <TPlugin extends IFCPlugin> |
registerListener(EPluginLifecycleEvent event,
Class<TPlugin> pluginType,
IPluginLifecycleListener<TPlugin> listener)
Registers a listener for a plugin event.
|
public static <TPlugin extends IFCPlugin> void deregisterListener(EPluginLifecycleEvent event, Class<TPlugin> pluginType, IPluginLifecycleListener<TPlugin> listener)
TPlugin
- Type of the plugin to which the listener is limited.event
- Type of event for which to register a listener.pluginType
- Type of plugins for which the listener is called.listener
- The listener that should be removed.public static void deregisterListeners()
public static void deregisterListeners(EPluginLifecycleEvent event)
event
- Type of event for which to register a listener.public static void deregisterListeners(EPluginLifecycleEvent event, Class<? extends IFCPlugin> pluginType)
event
- Type of event for which to register a listener.pluginType
- Type of plugins for which the listener is called.public static void fireEvent(EPluginLifecycleEvent event, PluginRuntime pluginRuntime, IFCPlugin plugin) throws FCPluginException
event
- The event that occurred.pluginRuntime
- The current plugin runtime.plugin
- The current plugin.FCPluginException
- When any of the registered listeners throws.public static <TPlugin extends IFCPlugin> void registerListener(EPluginLifecycleEvent event, Class<TPlugin> pluginType, IPluginLifecycleListener<TPlugin> listener)
IFCPlugin
class.
It is possible to register multiple listeners for the same event and the same plugin type. Note however, that you
cannot register the same listener twice. Whether two listeners are the same is determined by their
Object.equals(Object)
and Object.hashCode()
methods.
TPlugin
- Type of the plugin to which the listener is limited.event
- Type of event for which to register a listener.pluginType
- Type of plugins for which the listener will be called. To listen to all plugins, pass the
IFCPlugin
class.listener
- The listener which will be called.Copyright © 2020 XIMA MEDIA GmbH. All rights reserved.