|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.chaosserver.jtunes.event.JTunesApplicationEventHandler
Main application EventHandler and bus. This class follows the singleton pattern as there is only one in the system. Application events are fired into the handler and it will distribute all to all registered listeners in the same thread.
Field Summary | |
protected Set |
applicationEventListeners
Holds a set of all listeners to the application. |
Method Summary | |
void |
addJTunesApplicationEventListener(JTunesApplicationEventListener applicationEventListener)
Adds an application listener to the system. |
static JTunesApplicationEventHandler |
create()
Creates the event handler. |
void |
fireEvent(JTunesApplicationEvent evt)
Fires an event to all of the listeners in the current thread. |
static JTunesApplicationEventHandler |
getInstance()
Gets the singleton instance of the JTunesApplicationEventHandler. |
Set |
getJTunesApplicationEventListeners()
Gets the set of all JTunesApplicationEventListeners in the system. |
void |
removeJTunesApplicationEventListener(JTunesApplicationEventListener applicationEventListener)
Removes an application listener from the handler. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected Set applicationEventListeners
Method Detail |
public static JTunesApplicationEventHandler create()
public static JTunesApplicationEventHandler getInstance()
public void fireEvent(JTunesApplicationEvent evt)
evt
- the event to firepublic void addJTunesApplicationEventListener(JTunesApplicationEventListener applicationEventListener)
applicationEventListener
- the listener to addpublic Set getJTunesApplicationEventListeners()
public void removeJTunesApplicationEventListener(JTunesApplicationEventListener applicationEventListener)
applicationEventListener
- listener to remove
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |