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

  • 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.WebServiceException
      Description copied from interface: Block
      Get the OMElement represented by this Block. This call always consumes the block because you are taking control of the underlying OM
      Specified by:
      getOMElement in interface Block<jakarta.activation.DataSource,Void>
      Overrides:
      getOMElement in class BlockImpl<jakarta.activation.DataSource,Void>
      Returns:
      Throws:
      XMLStreamException
      jakarta.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: 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 class BlockImpl<jakarta.activation.DataSource,Void>
      Returns:
      Business Object
      Throws:
      XMLStreamException
      jakarta.xml.ws.WebServiceException
    • _getReaderFromBO

      protected XMLStreamReader _getReaderFromBO(jakarta.activation.DataSource busObj, Void busContext) throws XMLStreamException, jakarta.xml.ws.WebServiceException
      Description copied from class: BlockImpl
      Get an XMLStreamReader for the BusinessObject The derived Block must implement this method
      Specified by:
      _getReaderFromBO in class BlockImpl<jakarta.activation.DataSource,Void>
      Returns:
      Throws:
      XMLStreamException
      jakarta.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: BlockImpl
      Output BusinessObject contents to a Writer. Derived classes must provide this implementation
      Specified by:
      _outputFromBO in class BlockImpl<jakarta.activation.DataSource,Void>
      Throws:
      XMLStreamException
      jakarta.xml.ws.WebServiceException
    • _getBOFromBO

      protected jakarta.activation.DataSource _getBOFromBO(jakarta.activation.DataSource busObject, Void busContext, boolean consume)
      Description copied from class: BlockImpl
      The 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:
      _getBOFromBO in class BlockImpl<jakarta.activation.DataSource,Void>
      Returns:
    • isElementData

      public boolean isElementData()
      Specified by:
      isElementData in interface Block<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:
      close in interface org.apache.axiom.om.OMDataSourceExt
      Overrides:
      close in class org.apache.axiom.om.ds.AbstractOMDataSource
    • getObject

      public Object getObject()
      Specified by:
      getObject in interface org.apache.axiom.om.OMDataSourceExt
      Overrides:
      getObject in class org.apache.axiom.om.ds.AbstractOMDataSource
    • isDestructiveRead

      public boolean isDestructiveRead()
      Specified by:
      isDestructiveRead in interface org.apache.axiom.om.OMDataSourceExt
    • isDestructiveWrite

      public boolean isDestructiveWrite()
      Specified by:
      isDestructiveWrite in interface org.apache.axiom.om.OMDataSourceExt