public abstract class EventSourceAdapter<EventAtom> extends java.lang.Object implements EventSource<EventAtom>
Constructor and Description |
---|
EventSourceAdapter(EventSourceSpecification<EventAtom> specification,
EventRealm realm) |
Modifier and Type | Method and Description |
---|---|
boolean |
addHandler(EventHandler<EventAtom> handler) |
protected void |
afterHandlerAdded(EventHandler<EventAtom> handler,
boolean firstHandler) |
protected void |
afterHandlerRemoved(EventHandler<EventAtom> handler,
boolean handlersEmpty) |
protected void |
beforeHandlerAdded(EventHandler<EventAtom> handler,
boolean handlersEmpty) |
protected void |
beforeHandlerRemoved(EventHandler<EventAtom> handler,
boolean lastHandler) |
void |
dispose() |
EventRealm |
getRealm() |
EventSourceSpecification<EventAtom> |
getSourceSpecification() |
void |
notifyHandlers(Event<EventAtom> event) |
protected abstract void |
prepareSource() |
boolean |
removeHandler(EventHandler<EventAtom> handler) |
public EventSourceAdapter(EventSourceSpecification<EventAtom> specification, EventRealm realm)
public EventSourceSpecification<EventAtom> getSourceSpecification()
getSourceSpecification
in interface EventSource<EventAtom>
public EventRealm getRealm()
getRealm
in interface EventSource<EventAtom>
public boolean addHandler(EventHandler<EventAtom> handler)
public boolean removeHandler(EventHandler<EventAtom> handler)
protected void beforeHandlerAdded(EventHandler<EventAtom> handler, boolean handlersEmpty)
protected void afterHandlerAdded(EventHandler<EventAtom> handler, boolean firstHandler)
protected void beforeHandlerRemoved(EventHandler<EventAtom> handler, boolean lastHandler)
protected void afterHandlerRemoved(EventHandler<EventAtom> handler, boolean handlersEmpty)
protected abstract void prepareSource()
public void dispose()
dispose
in interface EventSource<EventAtom>