org.apache.axis2.jaxws.message.factory
Interface BlockFactory

All Known Subinterfaces:
JAXBBlockFactory, OMBlockFactory, SOAPEnvelopeBlockFactory, SourceBlockFactory, XMLStringBlockFactory
All Known Implementing Classes:
BlockFactoryImpl, JAXBBlockFactoryImpl, OMBlockFactoryImpl, SOAPEnvelopeBlockFactoryImpl, SourceBlockFactoryImpl, XMLStringBlockFactoryImpl

public interface BlockFactory

BlockFactory

Interface to create Block objects An object is created from either a reader, another Block or the BusinessObject. Some business objects (like JAXB) have an associated context object (JAXBContext), these are also passed to the createMethods.

The implementation of BlockFactories should always be singleton objects and never carry any instance data.

The FactoryRegistry should be used to get access to a Factory

See Also:
FactoryRegistry

Method Summary
 Block createFrom(Block other, java.lang.Object context)
          createBlock from another Block If the other Block was created with the same factory and has the same context, the other Block is returned.
 Block createFrom(java.lang.Object businessObject, java.lang.Object context, QName qName)
          Create from business object
 Block createFrom(org.apache.axiom.om.OMElement omElement, java.lang.Object context, QName qName)
          createBlock from XMLStreamReader
 Block createFrom(javax.xml.stream.XMLStreamReader reader, java.lang.Object context, QName qName)
          createBlock from XMLStreamReader
 boolean isElement()
           
 

Method Detail

createFrom

Block createFrom(javax.xml.stream.XMLStreamReader reader,
                 java.lang.Object context,
                 QName qName)
                 throws javax.xml.stream.XMLStreamException,
                        WebServiceException
createBlock from XMLStreamReader

Parameters:
reader - XMLStreamReader
context - Associated Context or null
QName - must be supplied if known
Throws:
javax.xml.stream.XMLStreamException
WebServiceException

createFrom

Block createFrom(org.apache.axiom.om.OMElement omElement,
                 java.lang.Object context,
                 QName qName)
                 throws javax.xml.stream.XMLStreamException,
                        WebServiceException
createBlock from XMLStreamReader

Parameters:
omElement - OMElement
context - Associated Context or null
QName - must be supplied if known
Throws:
javax.xml.stream.XMLStreamException
WebServiceException

createFrom

Block createFrom(Block other,
                 java.lang.Object context)
                 throws javax.xml.stream.XMLStreamException,
                        WebServiceException
createBlock from another Block If the other Block was created with the same factory and has the same context, the other Block is returned. If the other Block was created by a different factory or diffent context, a new block is returned (and the other block is consumed)

Parameters:
other - Block
context - Associated Context or null
Throws:
javax.xml.stream.XMLStreamException
WebServiceException

createFrom

Block createFrom(java.lang.Object businessObject,
                 java.lang.Object context,
                 QName qName)
                 throws WebServiceException
Create from business object

Parameters:
businessObject -
context - Associated Context or null
QName - must be supplied if known
Throws:
javax.xml.stream.XMLStreamException
WebServiceException

isElement

boolean isElement()
Returns:
true if business object must be rendered as an element example JAXBFactory ...true example SourceFactory...false


Copyright © 2007 Apache Web Services Project. All Rights Reserved.