public class AbstractListenerRegistry<E extends Event,L extends EventListener<E>> extends Object implements EventSink<E>
| Constructor and Description |
|---|
AbstractListenerRegistry() |
| Modifier and Type | Method and Description |
|---|---|
void |
activate()
Prepares the registry for normal operation.
|
void |
addListener(L listener)
Adds the specified listener.
|
void |
deactivate()
Prepares the registry for shutdown.
|
void |
process(E event)
Processes the specified event.
|
void |
removeListener(L listener)
Removes the specified listener.
|
protected void |
reportProblem(E event,
Throwable error)
Reports a problem encountered while processing an event.
|
public void addListener(L listener)
listener - listener to be addedpublic void removeListener(L listener)
listener - listener to be removedpublic void process(E event)
EventSinkprotected void reportProblem(E event, Throwable error)
event - event being processederror - error encountered while processingpublic void activate()
public void deactivate()
Copyright © 2015. All rights reserved.