de.intarsys.tools.event
Class EventDispatcher
java.lang.Object
de.intarsys.tools.event.EventDispatcher
- All Implemented Interfaces:
- IEventDispatcher, INotificationSupport
public class EventDispatcher
- extends Object
- implements INotificationSupport, IEventDispatcher
Helper object for management and dispatching of events.
EventDispatcher
public EventDispatcher(Object pOwner)
addNotificationListener
public void addNotificationListener(EventType type,
INotificationListener listener)
- Description copied from interface:
INotificationSupport
- Add
listener
to the collection of objects to be informed
when the receiver triggers an event of type name
.
- Specified by:
addNotificationListener
in interface INotificationSupport
- Parameters:
type
- The event type we are interested in.listener
- The object to be informed about an event occurrence
attach
public void attach(INotificationSupport support)
clear
public void clear()
detach
public void detach(INotificationSupport support)
getOwner
public Object getOwner()
isEmpty
public boolean isEmpty()
removeNotificationListener
public void removeNotificationListener(EventType type,
INotificationListener listener)
- Description copied from interface:
INotificationSupport
- Remove
listener
from the collection of objects to be
informed about events of type name
.
- Specified by:
removeNotificationListener
in interface INotificationSupport
- Parameters:
type
- The event type we are no longer interested in.listener
- The object registered for the event till now.
triggerEvent
public void triggerEvent(Event event)
- Specified by:
triggerEvent
in interface IEventDispatcher
triggerEventReverse
public void triggerEventReverse(Event event)
Copyright © 2008 intarsys consulting GmbH. All Rights Reserved.