|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.axis2.jaxws.message.impl.BlockImpl
public abstract class BlockImpl
BlockImpl Abstract Base class for various Block Implementations.
The base class takes care of controlling the transformations between BusinessObject, XMLStreamReader and SOAPElement A derived class must minimally define the following: _getBOFromReader _getReaderFromBO _outputFromBO In addtion, the derived class may want to override the following: _getBOFromBO ...if the BusinessObject is consumed when read (i.e. it is an InputSource) The derived classes don't have direct access to the instance data. This ensures that BlockImpl controls the transformations.
Field Summary | |
---|---|
protected java.lang.Object |
busContext
|
protected java.lang.Object |
busObject
|
protected boolean |
consumed
|
protected BlockFactory |
factory
|
protected org.apache.axiom.om.OMElement |
omElement
|
protected Message |
parent
|
protected QName |
qName
|
Constructor Summary | |
---|---|
protected |
BlockImpl(java.lang.Object busObject,
java.lang.Object busContext,
QName qName,
BlockFactory factory)
A Block has the following components |
protected |
BlockImpl(org.apache.axiom.om.OMElement omElement,
java.lang.Object busContext,
QName qName,
BlockFactory factory)
A Block has the following components |
Method Summary | |
---|---|
protected java.lang.Object |
_getBOFromBO(java.lang.Object busObject,
java.lang.Object busContext,
boolean consume)
The default implementation is to return the business object. |
protected java.lang.Object |
_getBOFromOM(org.apache.axiom.om.OMElement omElement,
java.lang.Object busContext)
Default method for getting business object from OM. |
protected abstract java.lang.Object |
_getBOFromReader(javax.xml.stream.XMLStreamReader reader,
java.lang.Object busContext)
The derived class must provide an implementation that builds the business object from the reader |
protected org.apache.axiom.om.OMElement |
_getOMFromBO(java.lang.Object busObject,
java.lang.Object busContext)
|
protected abstract javax.xml.stream.XMLStreamReader |
_getReaderFromBO(java.lang.Object busObj,
java.lang.Object busContext)
Get an XMLStreamReader for the BusinessObject The derived Block must implement this method |
protected javax.xml.stream.XMLStreamReader |
_getReaderFromOM(org.apache.axiom.om.OMElement omElement)
|
protected abstract void |
_outputFromBO(java.lang.Object busObject,
java.lang.Object busContext,
javax.xml.stream.XMLStreamWriter writer)
Output BusinessObject contents to a Writer. |
protected void |
_outputFromOM(org.apache.axiom.om.OMElement omElement,
javax.xml.stream.XMLStreamWriter writer,
boolean consume)
Output OMElement contents to a Writer. |
protected void |
_outputFromReader(javax.xml.stream.XMLStreamReader reader,
javax.xml.stream.XMLStreamWriter writer)
Output Reader contents to a Writer. |
protected javax.xml.stream.XMLStreamReader |
_postPivot_getXMLStreamReader()
Called if we have passed the pivot point but someone wants to output the block. |
protected void |
_postPivot_outputTo(javax.xml.stream.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 |
java.lang.Object |
getBusinessContext()
GetBusinesContext Some business objects have an associated context object (i.e. |
java.lang.Object |
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 |
java.lang.Object |
getProperty(java.lang.String key)
|
QName |
getQName()
Get the QName (namespace, localpart) of the Block. |
javax.xml.stream.XMLStreamReader |
getReader()
|
javax.xml.stream.XMLStreamReader |
getXMLStreamReader(boolean consume)
Get the XMLStreamReader represented by this Block |
boolean |
hasProperty(java.lang.String key)
|
protected boolean |
isBusinessObject()
|
boolean |
isConsumed()
isConsumed Return true if the block is consumed. |
boolean |
isQNameAvailable()
|
void |
outputTo(javax.xml.stream.XMLStreamWriter writer,
boolean consume)
Write out the Block |
void |
serialize(java.io.OutputStream output,
org.apache.axiom.om.OMOutputFormat format)
|
void |
serialize(java.io.Writer writerTarget,
org.apache.axiom.om.OMOutputFormat format)
|
void |
serialize(javax.xml.stream.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) |
java.lang.Object |
setProperty(java.lang.String key,
java.lang.Object value)
|
protected void |
setQName(QName qName)
This method is intended for derived objects to set the qName |
java.lang.String |
traceString(java.lang.String indent)
Get a traceString...the trace string dumps the contents of the Block without forcing an underlying ill-performant transformation of the message. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.axis2.jaxws.message.Block |
---|
isElementData |
Methods inherited from interface org.apache.axiom.om.OMDataSourceExt |
---|
close, getObject, getXMLBytes, getXMLInputStream, isDestructiveRead, isDestructiveWrite |
Field Detail |
---|
protected java.lang.Object busObject
protected java.lang.Object busContext
protected org.apache.axiom.om.OMElement omElement
protected QName qName
protected BlockFactory factory
protected boolean consumed
protected Message parent
Constructor Detail |
---|
protected BlockImpl(java.lang.Object busObject, java.lang.Object busContext, QName qName, BlockFactory factory)
busObject
- busContext
- or nullqName
- or null if unknownfactory
- that creates the Blockprotected BlockImpl(org.apache.axiom.om.OMElement omElement, java.lang.Object busContext, QName qName, BlockFactory factory)
reader
- busContext
- or nullqName
- or null if unknownfactory
- that creates the BlockMethod Detail |
---|
public BlockFactory getBlockFactory()
Block
getBlockFactory
in interface Block
public java.lang.Object getBusinessContext()
Block
getBusinessContext
in interface Block
public Message getParent()
Block
getParent
in interface Block
public void setParent(Message p)
Block
setParent
in interface Block
public java.lang.Object getBusinessObject(boolean consume) throws javax.xml.stream.XMLStreamException, WebServiceException
Block
getBusinessObject
in interface Block
consume
- true if this is the last request on the block.
javax.xml.stream.XMLStreamException
WebServiceException
public QName getQName() throws WebServiceException
Block
getQName
in interface Block
WebServiceException
isQNameAvailable
protected void setQName(QName qName)
qName
- public javax.xml.stream.XMLStreamReader getXMLStreamReader(boolean consume) throws javax.xml.stream.XMLStreamException, WebServiceException
Block
getXMLStreamReader
in interface Block
consume
- true if this is the last request on the block.
javax.xml.stream.XMLStreamException
WebServiceException
public javax.xml.stream.XMLStreamReader getReader() throws javax.xml.stream.XMLStreamException
getReader
in interface org.apache.axiom.om.OMDataSource
getReader
in interface org.apache.axiom.om.OMDataSourceExt
javax.xml.stream.XMLStreamException
public void serialize(java.io.OutputStream output, org.apache.axiom.om.OMOutputFormat format) throws javax.xml.stream.XMLStreamException
serialize
in interface org.apache.axiom.om.OMDataSource
serialize
in interface org.apache.axiom.om.OMDataSourceExt
javax.xml.stream.XMLStreamException
public void serialize(java.io.Writer writerTarget, org.apache.axiom.om.OMOutputFormat format) throws javax.xml.stream.XMLStreamException
serialize
in interface org.apache.axiom.om.OMDataSource
serialize
in interface org.apache.axiom.om.OMDataSourceExt
javax.xml.stream.XMLStreamException
public void serialize(javax.xml.stream.XMLStreamWriter writer) throws javax.xml.stream.XMLStreamException
serialize
in interface org.apache.axiom.om.OMDataSource
serialize
in interface org.apache.axiom.om.OMDataSourceExt
javax.xml.stream.XMLStreamException
public org.apache.axiom.om.OMElement getOMElement() throws javax.xml.stream.XMLStreamException, WebServiceException
Block
getOMElement
in interface Block
javax.xml.stream.XMLStreamException
WebServiceException
public boolean isConsumed()
Block
isConsumed
in interface Block
public void setConsumed(boolean consume)
consume
- public boolean isQNameAvailable()
isQNameAvailable
in interface Block
public void outputTo(javax.xml.stream.XMLStreamWriter writer, boolean consume) throws javax.xml.stream.XMLStreamException, WebServiceException
Block
outputTo
in interface Block
writer
- XMLStreamWriterconsume
- true if this is the last request on the block.
javax.xml.stream.XMLStreamException
WebServiceException
protected void _postPivot_outputTo(javax.xml.stream.XMLStreamWriter writer) throws javax.xml.stream.XMLStreamException, WebServiceException
javax.xml.stream.XMLStreamException
WebServiceException
protected javax.xml.stream.XMLStreamReader _postPivot_getXMLStreamReader() throws javax.xml.stream.XMLStreamException, WebServiceException
javax.xml.stream.XMLStreamException
WebServiceException
protected boolean isBusinessObject()
public java.lang.String traceString(java.lang.String indent)
Block
traceString
in interface Block
protected java.lang.Object _getBOFromBO(java.lang.Object busObject, java.lang.Object busContext, boolean consume)
busObject
- busContext
- consume
-
protected abstract java.lang.Object _getBOFromReader(javax.xml.stream.XMLStreamReader reader, java.lang.Object busContext) throws javax.xml.stream.XMLStreamException, WebServiceException
reader
- XMLStreamReader, which is consumedbusContext
-
javax.xml.stream.XMLStreamException
WebServiceException
protected java.lang.Object _getBOFromOM(org.apache.axiom.om.OMElement omElement, java.lang.Object busContext) throws javax.xml.stream.XMLStreamException, WebServiceException
om
- busContext
-
javax.xml.stream.XMLStreamException
WebServiceException
protected abstract javax.xml.stream.XMLStreamReader _getReaderFromBO(java.lang.Object busObj, java.lang.Object busContext) throws javax.xml.stream.XMLStreamException, WebServiceException
busObj
- busContext
-
javax.xml.stream.XMLStreamException
WebServiceException
protected javax.xml.stream.XMLStreamReader _getReaderFromOM(org.apache.axiom.om.OMElement omElement)
omElement
-
protected org.apache.axiom.om.OMElement _getOMFromBO(java.lang.Object busObject, java.lang.Object busContext) throws javax.xml.stream.XMLStreamException, WebServiceException
busObject
- busContext
-
javax.xml.stream.XMLStreamException
WebServiceException
protected void _outputFromReader(javax.xml.stream.XMLStreamReader reader, javax.xml.stream.XMLStreamWriter writer) throws javax.xml.stream.XMLStreamException
reader
- writer
-
javax.xml.stream.XMLStreamException
protected void _outputFromOM(org.apache.axiom.om.OMElement omElement, javax.xml.stream.XMLStreamWriter writer, boolean consume) throws javax.xml.stream.XMLStreamException
om
- writer
-
javax.xml.stream.XMLStreamException
public org.apache.axiom.om.OMDataSourceExt copy() throws org.apache.axiom.om.OMException
copy
in interface org.apache.axiom.om.OMDataSourceExt
org.apache.axiom.om.OMException
protected abstract void _outputFromBO(java.lang.Object busObject, java.lang.Object busContext, javax.xml.stream.XMLStreamWriter writer) throws javax.xml.stream.XMLStreamException, WebServiceException
busObject
- busContext
- writer
-
javax.xml.stream.XMLStreamException
WebServiceException
public java.lang.Object getProperty(java.lang.String key)
getProperty
in interface org.apache.axiom.om.OMDataSourceExt
public java.lang.Object setProperty(java.lang.String key, java.lang.Object value)
setProperty
in interface org.apache.axiom.om.OMDataSourceExt
public boolean hasProperty(java.lang.String key)
hasProperty
in interface org.apache.axiom.om.OMDataSourceExt
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |