Class DataSourceBlockImpl
- java.lang.Object
-
- org.apache.axiom.om.ds.AbstractOMDataSource
-
- org.apache.axis2.jaxws.message.impl.BlockImpl<DataSource,Void>
-
- org.apache.axis2.jaxws.message.databinding.impl.DataSourceBlockImpl
-
- All Implemented Interfaces:
OMDataSource,OMDataSourceExt,Block<DataSource,Void>,DataSourceBlock
public class DataSourceBlockImpl extends BlockImpl<DataSource,Void> implements DataSourceBlock
SourceBlock Block containing a business object that is a javax.activation.DataSource
-
-
Constructor Summary
Constructors Constructor Description DataSourceBlockImpl(OMElement omElement, QName qName, BlockFactory factory)Constructor called from factory
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected DataSource_getBOFromBO(DataSource busObject, Void busContext, boolean consume)The default implementation is to return the business object.protected DataSource_getBOFromOM(OMElement omElement, Void busContext)Default method for getting business object from OM.protected XMLStreamReader_getReaderFromBO(DataSource busObj, Void busContext)Get an XMLStreamReader for the BusinessObject The derived Block must implement this methodprotected void_outputFromBO(DataSource busObject, Void busContext, XMLStreamWriter writer)Output BusinessObject contents to a Writer.voidclose()ObjectgetObject()OMElementgetOMElement()Get the OMElement represented by this Block.booleanisDestructiveRead()booleanisDestructiveWrite()booleanisElementData()-
Methods inherited from class org.apache.axis2.jaxws.message.impl.BlockImpl
_getOMFromBO, _outputFromOM, _outputFromReader, _postPivot_getXMLStreamReader, _postPivot_outputTo, copy, getBlockFactory, getBusinessContext, getBusinessObject, getParent, getQName, getReader, getXMLStreamReader, isBusinessObject, isConsumed, isQNameAvailable, outputTo, serialize, setConsumed, setParent, 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, getParent, getQName, getXMLStreamReader, isConsumed, isQNameAvailable, outputTo, setParent, traceString
-
Methods inherited from interface org.apache.axiom.om.OMDataSource
getReader, serialize, serialize, serialize
-
Methods inherited from interface org.apache.axiom.om.OMDataSourceExt
copy, getProperty, getXMLBytes, getXMLInputStream, hasProperty, setProperty
-
-
-
-
Constructor Detail
-
DataSourceBlockImpl
public DataSourceBlockImpl(OMElement omElement, QName qName, BlockFactory factory)
Constructor called from factory- Parameters:
reader-qName-factory-
-
-
Method Detail
-
getOMElement
public OMElement getOMElement() throws XMLStreamException, WebServiceException
Description copied from interface:BlockGet the OMElement represented by this Block. This call always consumes the block because you are taking control of the underlying OM- Specified by:
getOMElementin interfaceBlock<DataSource,Void>- Overrides:
getOMElementin classBlockImpl<DataSource,Void>- Returns:
- Throws:
XMLStreamExceptionWebServiceException
-
_getBOFromOM
protected DataSource _getBOFromOM(OMElement omElement, Void busContext) throws XMLStreamException, WebServiceException
Description copied from class:BlockImplDefault method for getting business object from OM. Derived classes may override this method to get the business object from a data source.- Specified by:
_getBOFromOMin classBlockImpl<DataSource,Void>- Returns:
- Business Object
- Throws:
XMLStreamExceptionWebServiceException
-
_getReaderFromBO
protected XMLStreamReader _getReaderFromBO(DataSource busObj, Void busContext) throws XMLStreamException, WebServiceException
Description copied from class:BlockImplGet an XMLStreamReader for the BusinessObject The derived Block must implement this method- Specified by:
_getReaderFromBOin classBlockImpl<DataSource,Void>- Returns:
- Throws:
XMLStreamExceptionWebServiceException
-
_outputFromBO
protected void _outputFromBO(DataSource busObject, Void busContext, XMLStreamWriter writer) throws XMLStreamException, WebServiceException
Description copied from class:BlockImplOutput BusinessObject contents to a Writer. Derived classes must provide this implementation- Specified by:
_outputFromBOin classBlockImpl<DataSource,Void>- Throws:
XMLStreamExceptionWebServiceException
-
_getBOFromBO
protected DataSource _getBOFromBO(DataSource busObject, Void busContext, boolean consume)
Description copied from class:BlockImplThe default implementation is to return the business object. A derived block may want to override this class if the business object is consumed when read (thus the dervived block may want to make a buffered copy) (An example use case for overriding this method is the businessObject is an InputSource)- Overrides:
_getBOFromBOin classBlockImpl<DataSource,Void>- Returns:
-
isElementData
public boolean isElementData()
- Specified by:
isElementDatain interfaceBlock<DataSource,Void>- Returns:
- true if data is always an element; false if possibly mixed content or multiple elements
-
close
public void close()
- Specified by:
closein interfaceOMDataSourceExt- Overrides:
closein classAbstractOMDataSource
-
getObject
public Object getObject()
- Specified by:
getObjectin interfaceOMDataSourceExt- Overrides:
getObjectin classAbstractOMDataSource
-
isDestructiveRead
public boolean isDestructiveRead()
- Specified by:
isDestructiveReadin interfaceOMDataSourceExt
-
isDestructiveWrite
public boolean isDestructiveWrite()
- Specified by:
isDestructiveWritein interfaceOMDataSourceExt
-
-