Class JAXBBlockImpl
- java.lang.Object
-
- org.apache.axiom.om.ds.AbstractOMDataSource
-
- org.apache.axis2.jaxws.message.impl.BlockImpl<Object,JAXBBlockContext>
-
- org.apache.axis2.jaxws.message.databinding.impl.JAXBBlockImpl
-
- All Implemented Interfaces:
OMDataSource
,OMDataSourceExt
,Block<Object,JAXBBlockContext>
,JAXBBlock
public class JAXBBlockImpl extends BlockImpl<Object,JAXBBlockContext> implements JAXBBlock
JAXBBlockImpl A Block containing a JAXB business object (either a JAXBElement or an object with @XmlRootElement).
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Object
_getBOFromOM(OMElement omElement, JAXBBlockContext busContext)
Default method for getting business object from OM.protected XMLStreamReader
_getReaderFromBO(Object busObj, JAXBBlockContext busContext)
Get an XMLStreamReader for the BusinessObject The derived Block must implement this methodprotected void
_outputFromBO(Object busObject, JAXBBlockContext busContext, XMLStreamWriter writer)
Output BusinessObject contents to a Writer.void
close()
OMDataSourceExt
copy()
Object
getObject()
boolean
isDestructiveRead()
boolean
isDestructiveWrite()
boolean
isElementData()
void
setParent(Message message)
Set the Message associated with this block (This method is intended to be called by the Message Implementation only)-
Methods inherited from class org.apache.axis2.jaxws.message.impl.BlockImpl
_getBOFromBO, _getOMFromBO, _outputFromOM, _outputFromReader, _postPivot_getXMLStreamReader, _postPivot_outputTo, getBlockFactory, getBusinessContext, getBusinessObject, getOMElement, getParent, getQName, getReader, getXMLStreamReader, isBusinessObject, isConsumed, isQNameAvailable, outputTo, serialize, setConsumed, setQName, traceString
-
Methods inherited from class org.apache.axiom.om.ds.AbstractOMDataSource
getProperty, getXMLBytes, getXMLInputStream, hasProperty, serialize, serialize, setProperty
-
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
getBlockFactory, getBusinessContext, getBusinessObject, getOMElement, getParent, getQName, getXMLStreamReader, isConsumed, isQNameAvailable, outputTo, traceString
-
Methods inherited from interface org.apache.axiom.om.OMDataSource
getReader, serialize, serialize, serialize
-
Methods inherited from interface org.apache.axiom.om.OMDataSourceExt
getProperty, getXMLBytes, getXMLInputStream, hasProperty, setProperty
-
-
-
-
Method Detail
-
_getBOFromOM
protected Object _getBOFromOM(OMElement omElement, JAXBBlockContext busContext) throws XMLStreamException, WebServiceException
Description copied from class:BlockImpl
Default method for getting business object from OM. Derived classes may override this method to get the business object from a data source.- Specified by:
_getBOFromOM
in classBlockImpl<Object,JAXBBlockContext>
- Returns:
- Business Object
- Throws:
XMLStreamException
WebServiceException
-
_getReaderFromBO
protected XMLStreamReader _getReaderFromBO(Object busObj, JAXBBlockContext busContext) throws XMLStreamException, WebServiceException
Description copied from class:BlockImpl
Get an XMLStreamReader for the BusinessObject The derived Block must implement this method- Specified by:
_getReaderFromBO
in classBlockImpl<Object,JAXBBlockContext>
- Returns:
- Throws:
XMLStreamException
WebServiceException
-
_outputFromBO
protected void _outputFromBO(Object busObject, JAXBBlockContext busContext, XMLStreamWriter writer) throws XMLStreamException, WebServiceException
Description copied from class:BlockImpl
Output BusinessObject contents to a Writer. Derived classes must provide this implementation- Specified by:
_outputFromBO
in classBlockImpl<Object,JAXBBlockContext>
- Throws:
XMLStreamException
WebServiceException
-
isElementData
public boolean isElementData()
- Specified by:
isElementData
in interfaceBlock<Object,JAXBBlockContext>
- Returns:
- true if data is always an element; false if possibly mixed content or multiple elements
-
close
public void close()
- Specified by:
close
in interfaceOMDataSourceExt
- Overrides:
close
in classAbstractOMDataSource
-
getObject
public Object getObject()
- Specified by:
getObject
in interfaceOMDataSourceExt
- Overrides:
getObject
in classAbstractOMDataSource
-
isDestructiveRead
public boolean isDestructiveRead()
- Specified by:
isDestructiveRead
in interfaceOMDataSourceExt
-
isDestructiveWrite
public boolean isDestructiveWrite()
- Specified by:
isDestructiveWrite
in interfaceOMDataSourceExt
-
copy
public OMDataSourceExt copy() throws OMException
- Specified by:
copy
in interfaceOMDataSourceExt
- Overrides:
copy
in classBlockImpl<Object,JAXBBlockContext>
- Throws:
OMException
-
setParent
public void setParent(Message message)
Description copied from interface:Block
Set the Message associated with this block (This method is intended to be called by the Message Implementation only)- Specified by:
setParent
in interfaceBlock<Object,JAXBBlockContext>
- Overrides:
setParent
in classBlockImpl<Object,JAXBBlockContext>
-
-