@ParametersAreNonnullByDefault public class LoggingEventListener extends AbstractEventListener
EventListener
that logs every events.Constructor and Description |
---|
LoggingEventListener()
Constructs a new
LoggingEventListener with the default logging level. |
LoggingEventListener(Level level)
Constructs a new
LoggingEventListener with the given logging level . |
Modifier and Type | Method and Description |
---|---|
void |
onAttribute(ProxyAttribute attribute)
Handles an attribute in the current element.
|
void |
onComplete()
Handles the end of the current task.
|
void |
onInitialize()
Handles the start of a task.
|
void |
onReference(ProxyReference reference)
Handles a reference from the current element to another.
|
void |
onStartElement(ProxyElement element)
Handles the start of an element.
|
onEndElement
public LoggingEventListener()
LoggingEventListener
with the default logging level.public LoggingEventListener(Level level)
LoggingEventListener
with the given logging level
.level
- the logging level to usepublic void onInitialize()
Handler
onInitialize
in interface Handler
onInitialize
in class AbstractEventListener
Handler.onComplete()
,
Notifier.notifyInitialize()
public void onStartElement(ProxyElement element)
Handler
onStartElement
in interface Handler
onStartElement
in class AbstractEventListener
element
- the element of the new elementHandler.onEndElement()
,
Notifier.notifyStartElement(ProxyElement)
public void onAttribute(ProxyAttribute attribute)
Handler
onAttribute
in interface Handler
onAttribute
in class AbstractEventListener
attribute
- the new attributeHandler.onStartElement(ProxyElement)
,
Notifier.notifyAttribute(ProxyAttribute)
public void onReference(ProxyReference reference)
Handler
onReference
in interface Handler
onReference
in class AbstractEventListener
reference
- the new referenceHandler.onStartElement(ProxyElement)
,
Notifier.notifyReference(ProxyReference)
public void onComplete()
Handler
onComplete
in interface Handler
onComplete
in class AbstractEventListener
Handler.onInitialize()
,
Notifier.notifyComplete()
Copyright © 2013–2019 Atlanmod. All rights reserved.