Package relaxngcc.runtime
Class NGCCInterleaveFilter
java.lang.Object
relaxngcc.runtime.NGCCInterleaveFilter
- All Implemented Interfaces:
NGCCEventReceiver
,NGCCEventSource
public abstract class NGCCInterleaveFilter
extends Object
implements NGCCEventSource, NGCCEventReceiver
Dispatches incoming events into sub handlers appropriately
so that the interleaving semantics will be correctly realized.
- Author:
- Kohsuke Kawaguchi (kk@kohsuke.org)
-
Method Summary
Modifier and TypeMethodDescriptionvoid
enterAttribute
(String uri, String localName, String qname) void
enterElement
(String uri, String localName, String qname, Attributes atts) void
joinByEnterAttribute
(NGCCEventReceiver source, String uri, String local, String qname) void
joinByEnterElement
(NGCCEventReceiver source, String uri, String local, String qname, Attributes atts) Joins all the child receivers.void
joinByLeaveAttribute
(NGCCEventReceiver source, String uri, String local, String qname) void
joinByLeaveElement
(NGCCEventReceiver source, String uri, String local, String qname) void
joinByText
(NGCCEventReceiver source, String value) void
leaveAttribute
(String uri, String localName, String qname) void
leaveElement
(String uri, String localName, String qname) int
replace
(NGCCEventReceiver oldHandler, NGCCEventReceiver newHandler) Replaces an old handler with a new handler, and returns ID of the EventReceiver thread.void
sendEnterAttribute
(int threadId, String uri, String local, String qname) void
sendEnterElement
(int threadId, String uri, String local, String qname, Attributes atts) Sends an enter element event to the specified EventReceiver thread.void
sendLeaveAttribute
(int threadId, String uri, String local, String qname) void
sendLeaveElement
(int threadId, String uri, String local, String qname) void
void
-
Method Details
-
replace
Description copied from interface:NGCCEventSource
Replaces an old handler with a new handler, and returns ID of the EventReceiver thread.- Specified by:
replace
in interfaceNGCCEventSource
-
enterElement
public void enterElement(String uri, String localName, String qname, Attributes atts) throws SAXException - Specified by:
enterElement
in interfaceNGCCEventReceiver
- Throws:
SAXException
-
leaveElement
- Specified by:
leaveElement
in interfaceNGCCEventReceiver
- Throws:
SAXException
-
enterAttribute
- Specified by:
enterAttribute
in interfaceNGCCEventReceiver
- Throws:
SAXException
-
leaveAttribute
- Specified by:
leaveAttribute
in interfaceNGCCEventReceiver
- Throws:
SAXException
-
text
- Specified by:
text
in interfaceNGCCEventReceiver
- Throws:
SAXException
-
joinByEnterElement
public void joinByEnterElement(NGCCEventReceiver source, String uri, String local, String qname, Attributes atts) throws SAXException Joins all the child receivers.This method is called by a child receiver when it sees something that it cannot handle, or by this object itself when it sees an event that it can't process.
This method forces children to move to its final state, then revert to the parent.
- Parameters:
source
- If this method is called by one of the child receivers, the receiver object. If this method is called by itself, null.- Throws:
SAXException
-
joinByLeaveElement
public void joinByLeaveElement(NGCCEventReceiver source, String uri, String local, String qname) throws SAXException - Throws:
SAXException
-
joinByEnterAttribute
public void joinByEnterAttribute(NGCCEventReceiver source, String uri, String local, String qname) throws SAXException - Throws:
SAXException
-
joinByLeaveAttribute
public void joinByLeaveAttribute(NGCCEventReceiver source, String uri, String local, String qname) throws SAXException - Throws:
SAXException
-
joinByText
- Throws:
SAXException
-
sendEnterAttribute
public void sendEnterAttribute(int threadId, String uri, String local, String qname) throws SAXException - Specified by:
sendEnterAttribute
in interfaceNGCCEventSource
- Throws:
SAXException
-
sendEnterElement
public void sendEnterElement(int threadId, String uri, String local, String qname, Attributes atts) throws SAXException Description copied from interface:NGCCEventSource
Sends an enter element event to the specified EventReceiver thread.- Specified by:
sendEnterElement
in interfaceNGCCEventSource
- Throws:
SAXException
-
sendLeaveAttribute
public void sendLeaveAttribute(int threadId, String uri, String local, String qname) throws SAXException - Specified by:
sendLeaveAttribute
in interfaceNGCCEventSource
- Throws:
SAXException
-
sendLeaveElement
public void sendLeaveElement(int threadId, String uri, String local, String qname) throws SAXException - Specified by:
sendLeaveElement
in interfaceNGCCEventSource
- Throws:
SAXException
-
sendText
- Specified by:
sendText
in interfaceNGCCEventSource
- Throws:
SAXException
-