public interface NamespaceCallbackHandler
Implement callback logic to be executed anytime a process() method on a Namespace
implementation is called. These methods are:
Implementations should be threadsafe.
| Modifier and Type | Method and Description |
|---|---|
default void |
beforeProcess(String rootNamespace,
Feed feed,
XMLStreamReader reader)
Receives a callback before
Namespace.process(PodcastParserContext) is invoked. |
default void |
beforeProcess(String rootNamespace,
Item item,
XMLStreamReader reader)
Receives a callback before
Namespace.process(PodcastParserContext, Item) is invoked. |
default void |
registerUnhandledElement(String rootNamespace,
XMLStreamReader reader,
ParseLevel level)
Receives a callback when an element with an unknown namespace is encountered.
|
default void |
registerUnknownNamespace(String rootNamespace,
XMLStreamReader reader,
ParseLevel level)
Receives a callback when an element is encountered for which no handling has been defined in this
library.
|
default void beforeProcess(String rootNamespace, Feed feed, XMLStreamReader reader)
Receives a callback before Namespace.process(PodcastParserContext) is invoked.
Note that any implementation must not move the reader. Doing so will cause an
IllegalStateException to be thrown.
rootNamespace - String name of the root namespace (RSS|Atom)feed - Feed instance in the process of being builtreader - XMLStreamReader instance, having just processed a
XMLStreamConstants.START_ELEMENT event with this namespace.default void beforeProcess(String rootNamespace, Item item, XMLStreamReader reader)
Receives a callback before Namespace.process(PodcastParserContext, Item) is invoked.
Note that any implementation must not move the reader. Doing so will cause an
IllegalStateException to be thrown.
rootNamespace - String name of the root namespace (RSS|Atom)item - Item instance in the process of being builtreader - XMLStreamReader instance, having just processed a
XMLStreamConstants.START_ELEMENT event with this namespace.default void registerUnknownNamespace(String rootNamespace, XMLStreamReader reader, ParseLevel level)
Receives a callback when an element is encountered for which no handling has been defined in this library.
Note that any implementation must not move the reader. Doing so will cause an
IllegalStateException to be thrown.
rootNamespace - String name of the root namespace (RSS|Atom)reader - XMLStreamReader instance, having just processed a
XMLStreamConstants.START_ELEMENT event with the given namespace.level - ParseLevel level at which the element is encountereddefault void registerUnhandledElement(String rootNamespace, XMLStreamReader reader, ParseLevel level)
Receives a callback when an element with an unknown namespace is encountered. Unknown in this context means not implemented in this libary.
Note that any implementation must not move the reader. Doing so will cause an
IllegalStateException to be thrown.
rootNamespace - String name of the root namespace (RSS|Atom)reader - XMLStreamReader instance, having just processed a
XMLStreamConstants.START_ELEMENT event.level - ParseLevel level at which the element is encounteredCopyright © 2018. All rights reserved.