H
- the type of the notified Handler
@ParametersAreNonnullByDefault public abstract class AbstractNotifier<H extends Handler> extends Object implements Notifier
Notifier
that provides overall behavior for the management of handlers.Constructor and Description |
---|
AbstractNotifier() |
Modifier and Type | Method and Description |
---|---|
protected void |
addNext(Collection<H> handlers)
Adds all the
handlers that will be notified. |
void |
addNext(H handler)
Adds the
handler that will be notified. |
void |
notifyAttribute(ProxyAttribute attribute)
Notifies all registered handlers of a new attribute.
|
void |
notifyComplete()
Notifies all registered handlers of the end of the current task.
|
void |
notifyEndElement()
Notifies all registered handlers of the end of the current element.
|
void |
notifyInitialize()
Notifies all registered handlers of the start of a task.
|
void |
notifyReference(ProxyReference reference)
Notifies all registered handlers of a new reference.
|
void |
notifyStartElement(ProxyElement element)
Notifies all registered handlers of the start of a new element.
|
protected boolean |
supportsMultiTargets()
Returns
true if this notifier allow to notify several handlers. |
public void addNext(H handler)
handler
that will be notified.handler
- the handlerprotected void addNext(Collection<H> handlers)
handlers
that will be notified.handlers
- the handlersprotected boolean supportsMultiTargets()
true
if this notifier allow to notify several handlers.true
if this notifier allow to notify several handlerspublic void notifyInitialize() throws IOException
Notifier
notifyInitialize
in interface Notifier
IOException
Notifier.notifyComplete()
,
Handler.onInitialize()
public void notifyStartElement(ProxyElement element) throws IOException
Notifier
notifyStartElement
in interface Notifier
element
- the element of the new elementIOException
Notifier.notifyEndElement()
,
Handler.onStartElement(ProxyElement)
public void notifyAttribute(ProxyAttribute attribute) throws IOException
Notifier
notifyAttribute
in interface Notifier
attribute
- the new attributeIOException
Handler.onAttribute(ProxyAttribute)
public void notifyReference(ProxyReference reference) throws IOException
Notifier
notifyReference
in interface Notifier
reference
- the new referenceIOException
Handler.onReference(ProxyReference)
public void notifyEndElement() throws IOException
Notifier
notifyEndElement
in interface Notifier
IOException
Notifier.notifyStartElement(ProxyElement)
,
Handler.onEndElement()
public void notifyComplete() throws IOException
Notifier
notifyComplete
in interface Notifier
IOException
Notifier.notifyInitialize()
,
Handler.onComplete()
Copyright © 2013–2019 Atlanmod. All rights reserved.