public abstract class BlockImpl<T,C> extends org.apache.axiom.om.ds.AbstractOMDataSource implements Block<T,C>
| Modifier and Type | Field and Description |
|---|---|
protected C |
busContext |
protected T |
busObject |
protected boolean |
consumed |
protected BlockFactory |
factory |
protected org.apache.axiom.om.OMElement |
omElement |
protected Message |
parent |
protected QName |
qName |
| Modifier | Constructor and Description |
|---|---|
protected |
BlockImpl(C busContext,
org.apache.axiom.om.OMElement omElement,
QName qName,
BlockFactory factory) |
protected |
BlockImpl(org.apache.axiom.om.OMElement omElement,
C busContext,
QName qName,
BlockFactory factory)
A Block has the following components
|
protected |
BlockImpl(T busObject,
C busContext,
QName qName,
BlockFactory factory)
A Block has the following components
|
| Modifier and Type | Method and Description |
|---|---|
protected T |
_getBOFromBO(T busObject,
C busContext,
boolean consume)
The default implementation is to return the business object.
|
protected abstract T |
_getBOFromOM(org.apache.axiom.om.OMElement omElement,
C busContext)
Default method for getting business object from OM.
|
protected org.apache.axiom.om.OMElement |
_getOMFromBO(T busObject,
C busContext) |
protected abstract XMLStreamReader |
_getReaderFromBO(T busObj,
C busContext)
Get an XMLStreamReader for the BusinessObject The derived Block must implement this method
|
protected abstract void |
_outputFromBO(T busObject,
C busContext,
XMLStreamWriter writer)
Output BusinessObject contents to a Writer.
|
protected void |
_outputFromOM(org.apache.axiom.om.OMElement omElement,
XMLStreamWriter writer,
boolean consume)
Output OMElement contents to a Writer.
|
protected void |
_outputFromReader(XMLStreamReader reader,
XMLStreamWriter writer)
Output Reader contents to a Writer.
|
protected XMLStreamReader |
_postPivot_getXMLStreamReader()
Called if we have passed the pivot point but someone wants to output the block.
|
protected void |
_postPivot_outputTo(XMLStreamWriter writer)
Called if we have passed the pivot point but someone wants to output the block.
|
org.apache.axiom.om.OMDataSourceExt |
copy() |
BlockFactory |
getBlockFactory()
Get BlockFactory
|
Object |
getBusinessContext()
GetBusinesContext Some business objects have an associated context object (i.e.
|
T |
getBusinessObject(boolean consume)
Get a reference to the Business Object represented by this Block
|
org.apache.axiom.om.OMElement |
getOMElement()
Get the OMElement represented by this Block.
|
Message |
getParent()
Get the Message associated with this block
|
QName |
getQName()
Get the QName (namespace, localpart) of the Block.
|
XMLStreamReader |
getReader() |
XMLStreamReader |
getXMLStreamReader(boolean consume)
Get the XMLStreamReader represented by this Block
|
protected boolean |
isBusinessObject() |
boolean |
isConsumed()
isConsumed Return true if the block is consumed.
|
boolean |
isQNameAvailable() |
void |
outputTo(XMLStreamWriter writer,
boolean consume)
Write out the Block
|
void |
serialize(XMLStreamWriter writer) |
void |
setConsumed(boolean consume)
Once consumed, all instance data objects are nullified to prevent subsequent access
|
void |
setParent(Message p)
Set the Message associated with this block (This method is intended to be called by the
Message Implementation only)
|
protected void |
setQName(QName qName)
This method is intended for derived objects to set the qName
|
String |
traceString(String indent)
Get a traceString...the trace string dumps the contents of the Block without forcing an
underlying ill-performant transformation of the message.
|
close, getObject, getProperty, getXMLBytes, getXMLInputStream, hasProperty, serialize, serialize, setPropertyclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisElementDataprotected T busObject
protected C busContext
protected org.apache.axiom.om.OMElement omElement
protected QName qName
protected BlockFactory factory
protected boolean consumed
protected Message parent
protected BlockImpl(T busObject, C busContext, QName qName, BlockFactory factory)
busObject - busContext - or nullqName - or null if unknownfactory - that creates the Blockprotected BlockImpl(org.apache.axiom.om.OMElement omElement,
C busContext,
QName qName,
BlockFactory factory)
reader - busContext - or nullqName - or null if unknownfactory - that creates the Blockprotected BlockImpl(C busContext, org.apache.axiom.om.OMElement omElement, QName qName, BlockFactory factory)
public final BlockFactory getBlockFactory()
BlockgetBlockFactory in interface Block<T,C>public final Object getBusinessContext()
BlockgetBusinessContext in interface Block<T,C>public final Message getParent()
Blockpublic void setParent(Message p)
Blockpublic final T getBusinessObject(boolean consume) throws XMLStreamException, WebServiceException
BlockgetBusinessObject in interface Block<T,C>consume - true if this is the last request on the block.XMLStreamExceptionWebServiceExceptionpublic final QName getQName() throws WebServiceException
BlockgetQName in interface Block<T,C>WebServiceExceptionisQNameAvailableprotected final void setQName(QName qName)
qName - public final XMLStreamReader getXMLStreamReader(boolean consume) throws XMLStreamException, WebServiceException
BlockgetXMLStreamReader in interface Block<T,C>consume - true if this is the last request on the block.XMLStreamExceptionWebServiceExceptionpublic final XMLStreamReader getReader() throws XMLStreamException
getReader in interface org.apache.axiom.om.OMDataSourceXMLStreamExceptionpublic final void serialize(XMLStreamWriter writer) throws XMLStreamException
serialize in interface org.apache.axiom.om.OMDataSourceXMLStreamExceptionpublic org.apache.axiom.om.OMElement getOMElement()
throws XMLStreamException,
WebServiceException
BlockgetOMElement in interface Block<T,C>XMLStreamExceptionWebServiceExceptionpublic final boolean isConsumed()
BlockisConsumed in interface Block<T,C>public final void setConsumed(boolean consume)
consume - public final boolean isQNameAvailable()
isQNameAvailable in interface Block<T,C>public final void outputTo(XMLStreamWriter writer, boolean consume) throws XMLStreamException, WebServiceException
BlockoutputTo in interface Block<T,C>writer - XMLStreamWriterconsume - true if this is the last request on the block.XMLStreamExceptionWebServiceExceptionprotected final void _postPivot_outputTo(XMLStreamWriter writer) throws XMLStreamException, WebServiceException
protected final XMLStreamReader _postPivot_getXMLStreamReader() throws XMLStreamException, WebServiceException
protected final boolean isBusinessObject()
public final String traceString(String indent)
BlocktraceString in interface Block<T,C>protected T _getBOFromBO(T busObject, C busContext, boolean consume)
busObject - busContext - consume - protected abstract T _getBOFromOM(org.apache.axiom.om.OMElement omElement, C busContext) throws XMLStreamException, WebServiceException
om - busContext - XMLStreamExceptionWebServiceExceptionprotected abstract XMLStreamReader _getReaderFromBO(T busObj, C busContext) throws XMLStreamException, WebServiceException
busObj - busContext - XMLStreamExceptionWebServiceExceptionprotected org.apache.axiom.om.OMElement _getOMFromBO(T busObject, C busContext) throws XMLStreamException, WebServiceException
busObject - busContext - XMLStreamExceptionWebServiceExceptionprotected final void _outputFromReader(XMLStreamReader reader, XMLStreamWriter writer) throws XMLStreamException
reader - writer - XMLStreamExceptionprotected final void _outputFromOM(org.apache.axiom.om.OMElement omElement,
XMLStreamWriter writer,
boolean consume)
throws XMLStreamException
om - writer - XMLStreamExceptionpublic org.apache.axiom.om.OMDataSourceExt copy()
throws org.apache.axiom.om.OMException
copy in interface org.apache.axiom.om.OMDataSourceExtcopy in class org.apache.axiom.om.ds.AbstractOMDataSourceorg.apache.axiom.om.OMExceptionprotected abstract void _outputFromBO(T busObject, C busContext, XMLStreamWriter writer) throws XMLStreamException, WebServiceException
busObject - busContext - writer - XMLStreamExceptionWebServiceExceptionCopyright © 2004–2020 The Apache Software Foundation. All rights reserved.