Nux 1.4.1

nux.xom.sandbox
Class BroadcastNodeFactory

java.lang.Object
  extended bynu.xom.NodeFactory
      extended bynux.xom.sandbox.BroadcastNodeFactory

public final class BroadcastNodeFactory
extends NodeFactory

Streams input into one or more independent underlying node factories.

Author:
whoschek.AT.lbl.DOT.gov, $Author: hoschek3 $

Nested Class Summary
static class BroadcastNodeFactory.MultipleCausesException
          A RuntimeException containing an array of one or more causes (Throwables).
 
Constructor Summary
BroadcastNodeFactory(NodeFactory[] factories, boolean failFast)
          Constructs a new instance.
 
Method Summary
 void finishMakingDocument(Document doc)
          
 Nodes finishMakingElement(Element unused)
          
 Document[] getDocuments()
          Returns the document build for each of the factories.
 Nodes makeAttribute(String qname, String namespaceURI, String value, Attribute.Type type)
          
 Nodes makeComment(String data)
          
 Nodes makeDocType(String rootElementName, String publicID, String systemID)
          
 Nodes makeProcessingInstruction(String target, String data)
          
 Element makeRootElement(String qname, String namespaceURI)
          
 Nodes makeText(String text)
          
 Document startMakingDocument()
          
 Element startMakingElement(String qname, String namespaceURI)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BroadcastNodeFactory

public BroadcastNodeFactory(NodeFactory[] factories,
                            boolean failFast)
Constructs a new instance. In failFast mode fails immediately when at least one child throws an exception. Otherwise continues to stream into the remaining working factories and reports all collected failures on finishMakingDocument().

Parameters:
factories - the child factories to push into
failFast - whether or not to immediately report an exception on the first child failure
Method Detail

getDocuments

public Document[] getDocuments()
Returns the document build for each of the factories.


startMakingDocument

public Document startMakingDocument()


finishMakingDocument

public void finishMakingDocument(Document doc)


makeRootElement

public Element makeRootElement(String qname,
                               String namespaceURI)


startMakingElement

public Element startMakingElement(String qname,
                                  String namespaceURI)


finishMakingElement

public Nodes finishMakingElement(Element unused)


makeAttribute

public Nodes makeAttribute(String qname,
                           String namespaceURI,
                           String value,
                           Attribute.Type type)


makeComment

public Nodes makeComment(String data)


makeDocType

public Nodes makeDocType(String rootElementName,
                         String publicID,
                         String systemID)


makeProcessingInstruction

public Nodes makeProcessingInstruction(String target,
                                       String data)


makeText

public Nodes makeText(String text)


Nux 1.4.1