|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.module.ModuleListenerSupport
public class ModuleListenerSupport
A support class used by YModule
to manage the registered ModuleListener
s.
Constructor Summary | |
---|---|
ModuleListenerSupport(YModule module)
Initializes a new ModuleListenerSupport instance for the
given module. |
Method Summary | |
---|---|
void |
addModuleListener(ModuleListener listener)
Adds the given module listener to receive module events from this instance. |
void |
fireExceptionThrown(java.lang.Throwable t)
Propagates a module event of type ModuleEvent.TYPE_MODULE_EXCEPTION_THROWN to all registered ModuleListener s. |
void |
fireModuleDisposed()
Propagates a module event of type ModuleEvent.TYPE_MODULE_DISPOSED to all registered ModuleListener s. |
void |
fireModuleEventHappened(ModuleEvent event)
Notifies all registered listeners about the event. |
void |
fireModuleInitializing()
Propagates a module event of type ModuleEvent.TYPE_MODULE_INITIALIZING to all registered ModuleListener s. |
void |
fireModuleMainRunFinished()
Propagates a module event of type ModuleEvent.TYPE_MODULE_MAIN_RUN_FINISHED to all registered ModuleListener s. |
void |
fireModuleMainRunStarting()
Propagates a module event of type ModuleEvent.TYPE_MODULE_MAIN_RUN_STARTING to all registered ModuleListener s. |
ModuleListener[] |
getModuleListeners()
Returns all the module listeners that have been added to this support instance. |
boolean |
hasListeners()
Returns whether or not there are module listeners associated with this class. |
void |
removeModuleListener(ModuleListener listener)
Removes the given module listener so that it no longer receives module events from this instance. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ModuleListenerSupport(YModule module)
ModuleListenerSupport
instance for the
given module.
module
- the module whose event handling is managed by this instance.Method Detail |
---|
public void addModuleListener(ModuleListener listener)
listener
- The listener to register. May not be null
.public void removeModuleListener(ModuleListener listener)
listener
- The listener to remove.public ModuleListener[] getModuleListeners()
addModuleListener(ModuleListener)
,
removeModuleListener(ModuleListener)
public void fireModuleInitializing()
ModuleEvent.TYPE_MODULE_INITIALIZING
to all registered ModuleListener
s.
public void fireModuleDisposed()
ModuleEvent.TYPE_MODULE_DISPOSED
to all registered ModuleListener
s.
public void fireModuleMainRunStarting()
ModuleEvent.TYPE_MODULE_MAIN_RUN_STARTING
to all registered ModuleListener
s.
public void fireModuleMainRunFinished()
ModuleEvent.TYPE_MODULE_MAIN_RUN_FINISHED
to all registered ModuleListener
s.
public void fireExceptionThrown(java.lang.Throwable t)
ModuleEvent.TYPE_MODULE_EXCEPTION_THROWN
to all registered ModuleListener
s.
t
- the thrown exceptionpublic boolean hasListeners()
public void fireModuleEventHappened(ModuleEvent event)
event
- The event to be fired
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |