Class DataSourceBlockImpl
java.lang.Object
org.apache.axiom.om.ds.AbstractOMDataSource
org.apache.axis2.jaxws.message.impl.BlockImpl<jakarta.activation.DataSource,Void>
org.apache.axis2.jaxws.message.databinding.impl.DataSourceBlockImpl
- All Implemented Interfaces:
org.apache.axiom.om.OMDataSource,org.apache.axiom.om.OMDataSourceExt,Block<jakarta.activation.DataSource,,Void> DataSourceBlock
public class DataSourceBlockImpl
extends BlockImpl<jakarta.activation.DataSource,Void>
implements DataSourceBlock
SourceBlock
Block containing a business object that is a jakarta.activation.DataSource
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionDataSourceBlockImpl(org.apache.axiom.om.OMElement omElement, QName qName, BlockFactory factory) Constructor called from factory -
Method Summary
Modifier and TypeMethodDescriptionprotected jakarta.activation.DataSource_getBOFromBO(jakarta.activation.DataSource busObject, Void busContext, boolean consume) The default implementation is to return the business object.protected jakarta.activation.DataSource_getBOFromOM(org.apache.axiom.om.OMElement omElement, Void busContext) Default method for getting business object from OM.protected XMLStreamReader_getReaderFromBO(jakarta.activation.DataSource busObj, Void busContext) Get an XMLStreamReader for the BusinessObject The derived Block must implement this methodprotected void_outputFromBO(jakarta.activation.DataSource busObject, Void busContext, XMLStreamWriter writer) Output BusinessObject contents to a Writer.voidclose()org.apache.axiom.om.OMElementGet the OMElement represented by this Block.booleanbooleanbooleanMethods 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, traceStringMethods inherited from class org.apache.axiom.om.ds.AbstractOMDataSource
getProperty, getXMLBytes, getXMLInputStream, hasProperty, serialize, serialize, setPropertyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.axis2.jaxws.message.Block
getBlockFactory, getBusinessContext, getBusinessObject, getParent, getQName, getXMLStreamReader, isConsumed, isQNameAvailable, outputTo, setParent, traceStringMethods inherited from interface org.apache.axiom.om.OMDataSource
getReader, serialize, serialize, serializeMethods inherited from interface org.apache.axiom.om.OMDataSourceExt
copy, getProperty, getXMLBytes, getXMLInputStream, hasProperty, setProperty
-
Constructor Details
-
DataSourceBlockImpl
public DataSourceBlockImpl(org.apache.axiom.om.OMElement omElement, QName qName, BlockFactory factory) Constructor called from factory- Parameters:
reader-qName-factory-
-
-
Method Details
-
getOMElement
public org.apache.axiom.om.OMElement getOMElement() throws XMLStreamException, jakarta.xml.ws.WebServiceExceptionDescription 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<jakarta.activation.DataSource,Void> - Overrides:
getOMElementin classBlockImpl<jakarta.activation.DataSource,Void> - Returns:
- Throws:
XMLStreamExceptionjakarta.xml.ws.WebServiceException
-
_getBOFromOM
protected jakarta.activation.DataSource _getBOFromOM(org.apache.axiom.om.OMElement omElement, Void busContext) throws XMLStreamException, jakarta.xml.ws.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<jakarta.activation.DataSource,Void> - Returns:
- Business Object
- Throws:
XMLStreamExceptionjakarta.xml.ws.WebServiceException
-
_getReaderFromBO
protected XMLStreamReader _getReaderFromBO(jakarta.activation.DataSource busObj, Void busContext) throws XMLStreamException, jakarta.xml.ws.WebServiceException Description copied from class:BlockImplGet an XMLStreamReader for the BusinessObject The derived Block must implement this method- Specified by:
_getReaderFromBOin classBlockImpl<jakarta.activation.DataSource,Void> - Returns:
- Throws:
XMLStreamExceptionjakarta.xml.ws.WebServiceException
-
_outputFromBO
protected void _outputFromBO(jakarta.activation.DataSource busObject, Void busContext, XMLStreamWriter writer) throws XMLStreamException, jakarta.xml.ws.WebServiceException Description copied from class:BlockImplOutput BusinessObject contents to a Writer. Derived classes must provide this implementation- Specified by:
_outputFromBOin classBlockImpl<jakarta.activation.DataSource,Void> - Throws:
XMLStreamExceptionjakarta.xml.ws.WebServiceException
-
_getBOFromBO
protected jakarta.activation.DataSource _getBOFromBO(jakarta.activation.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<jakarta.activation.DataSource,Void> - Returns:
-
isElementData
public boolean isElementData()- Specified by:
isElementDatain interfaceBlock<jakarta.activation.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 interfaceorg.apache.axiom.om.OMDataSourceExt- Overrides:
closein classorg.apache.axiom.om.ds.AbstractOMDataSource
-
getObject
- Specified by:
getObjectin interfaceorg.apache.axiom.om.OMDataSourceExt- Overrides:
getObjectin classorg.apache.axiom.om.ds.AbstractOMDataSource
-
isDestructiveRead
public boolean isDestructiveRead()- Specified by:
isDestructiveReadin interfaceorg.apache.axiom.om.OMDataSourceExt
-
isDestructiveWrite
public boolean isDestructiveWrite()- Specified by:
isDestructiveWritein interfaceorg.apache.axiom.om.OMDataSourceExt
-