EVENT_TYPE
- An object that represents the type of the event.EVENT_LISTENER_TYPE
- An object that represents the type of the event listener.public final class StorageEventMultiCaster<EVENT_TYPE extends BaseEvent,EVENT_LISTENER_TYPE extends StorageEvent<EVENT_TYPE>> extends Object
Constructor and Description |
---|
StorageEventMultiCaster() |
Modifier and Type | Method and Description |
---|---|
void |
addListener(EVENT_LISTENER_TYPE listener)
Adds a listener to the event chain.
|
void |
fireEvent(EVENT_TYPE event)
Fires the event to all subscribed event listeners.
|
boolean |
hasListeners()
Returns a value that indicates whether any event listeners are registered for events.
|
void |
removeListener(EVENT_LISTENER_TYPE listener)
Removes an event listener from the event chain.
|
public void addListener(EVENT_LISTENER_TYPE listener)
listener
- An EventListenerType
object that represents the listener to add.public void fireEvent(EVENT_TYPE event)
event
- An EVENTTYPE
object that represents the event being multi-casted.public boolean hasListeners()
true
if any event listeners are registered; otherwise, false
.public void removeListener(EVENT_LISTENER_TYPE listener)
listener
- An EventListenerType
object that represents the listener to remove.Copyright © 2018. All Rights Reserved.