|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--de.kosi.util.ListenerList
Implements a abstract list of event listeners. Each listener has a user assigned. When the user goes offline, the listener is removed from the list. When the handling of a event fails with a RemoteException, the users online state is set to false.
ChangeLog:
$Log: ListenerList.java,v $ Revision 1.6 2001/08/30 12:03:04 jiriki Fixed Bug 440380 Revision 1.5 2001/06/12 17:14:33 jiriki - Reimplemented DistributedList to make filters working - Made ServertestCase working. Revision 1.4 2001/05/22 20:24:40 jiriki Made source more conformant to Coding Conventions. Revision 1.3 2001/05/22 10:16:03 jiriki - Removed old unused Client class - Removed unused import statements. Revision 1.2 2001/05/20 16:00:40 jiriki Moved WaitObjectManager to ListenerList. Revision 1.1.1.1 2001/04/29 18:05:19 jiriki Imported sources from zola. Revision 1.9 2001/04/11 17:40:49 wombat Updated Documentation. Revision 1.8 2001/04/11 16:54:04 wombat Removed some bugs when joining table and immidiatly leaving again. Revision 1.7 2001/04/09 13:03:10 wombat Removed timeout from threadpool (did not work) Revision 1.6 2001/03/23 10:48:52 wombat - Table now restarts game - began GuestUser implementation Revision 1.5 2001/03/22 16:40:47 wombat - Updated ant to 1.3 - Removed bugs in GameImpl and StressClient Revision 1.4 2001/03/21 13:26:36 wombat - Removed bugs in Table - began implementation of stree client - updated documentation Revision 1.3 2001/03/19 21:50:49 wombat - Worked on admin client. - improved shutdown sequence - removed bugs in login/logout sequence Revision 1.2 2001/03/01 20:31:32 wombat Worked on table implementation / updated documentation Revision 1.1 2001/02/25 23:16:29 wombat ListenerList erstellt.
Inner Class Summary | |
static interface |
ListenerList.EventDispatcher
Interface for an EventDispatcher. |
Constructor Summary | |
ListenerList()
Create a new ListenerList. |
Method Summary | |
void |
addListener(java.util.EventListener listener,
UserImpl user)
Add an EventListener to the list. |
void |
barrier()
A barrier for the ListenerList. |
void |
destroyed(UserImpl user)
Called when a UserImpl Object is about to be destroyed. |
void |
dispatchToAll(ListenerList.EventDispatcher dispatcher)
Dispatch an event to all listeners. |
void |
dispatchToListener(java.util.EventListener listener,
ListenerList.EventDispatcher dispatcher)
Dispatch an event to one listeners. |
void |
dispatchToUser(UserImpl user,
ListenerList.EventDispatcher dispatcher)
Dispatch an event to one user. |
void |
onlineChange(UserImpl user,
boolean isOnline)
This method is called when the online status of the user changes. |
UserImpl |
removeListener(java.util.EventListener listener)
Remove an EventListener from the list. |
UserImpl |
removeUserListener(UserImpl user)
Remove an EventListener registered by an user from the list. |
int |
size()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ListenerList()
Method Detail |
public void addListener(java.util.EventListener listener, UserImpl user)
listener
- Listener to add.user
- User the listener belongs to.public UserImpl removeListener(java.util.EventListener listener)
listener
- Listener to remove.public UserImpl removeUserListener(UserImpl user)
user
- User whos listener is removed.public int size()
public void dispatchToAll(ListenerList.EventDispatcher dispatcher)
dispatcher
- Event dispatcher, who knows, how to dispatch the event.public void dispatchToListener(java.util.EventListener listener, ListenerList.EventDispatcher dispatcher)
dispatcher
- Event dispatcher, who knows, how to dispatch the event.listener
- Listener the event willpublic void dispatchToUser(UserImpl user, ListenerList.EventDispatcher dispatcher)
dispatcher
- Event dispatcher, who knows, how to dispatch the event.user
- User the event is dispatched to.public void barrier()
public void onlineChange(UserImpl user, boolean isOnline)
onlineChange
in interface UserListener
user
- user whose state changed.isOnline
- wether the user is online.public void destroyed(UserImpl user)
destroyed
in interface UserListener
user
- UserImpl object to be destroyed.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |