Class XMLTransport

java.lang.Object
com.nt.udc.ndk.node.EITransport
com.nt.udc.ei.node.xml.XMLTransport
All Implemented Interfaces:
DataProviderIfc, DCTransport, FileDataProviderIfc, Runnable
Direct Known Subclasses:
XMLFileTransport

public abstract class XMLTransport extends EITransport
This is the parent class for transport types used by XML.
  • Field Details

    • m_debugLevel

      protected int m_debugLevel
      This member is used for debugging.
    • m_iStreamSource

      protected IStreamSource m_iStreamSource
      This member is used to provide the data input stream.
    • m_iFilenameFilter

      protected FilenameFilter m_iFilenameFilter
      This member is used to select the files to process.
    • m_reporter

      protected COSARReporter m_reporter
      This member is used to send reports to.
    • m_iLogger

      protected LoggerIfc m_iLogger
      This field is used to log errors.
    • m_config

      protected ConfigIfc m_config
      This field is used to get configuration information.
    • m_scratchDir

      protected File m_scratchDir
    • m_processor

      protected XMLProcessor m_processor
  • Constructor Details

  • Method Details

    • isDataAvailable

      public boolean isDataAvailable()
      This method is used by the DataReceiver to ask this provider if data is available.
      Specified by:
      isDataAvailable in interface DataProviderIfc
      Specified by:
      isDataAvailable in class EITransport
      Returns:
      true, if data is available
    • getData

      public DCFieldContainer getData()
      This method is used by the DataReceiver to fetch a single DCFieldContainer.
      Specified by:
      getData in interface DataProviderIfc
      Specified by:
      getData in class EITransport
      Returns:
      DCFieldContainer.
    • getBulkData

      public DCFieldContainer[] getBulkData()
      This method is used by the DataReceiver to fetch several DCFieldContainer objects.
      Specified by:
      getBulkData in interface DataProviderIfc
      Specified by:
      getBulkData in class EITransport
      Returns:
      DCFieldContainer object array, containing the data that is for processing
    • setProcessor

      public void setProcessor(XMLProcessor processor)
    • run

      public void run()
      This method is used when the EITransport runs within its own thread. The method should contain the logic to retrieve the data from the the transport's data source and to generate the DCFieldContainer() objects that will be passed on to the DataReceiver.
      Specified by:
      run in interface Runnable
      Specified by:
      run in class EITransport
    • shutdown

      public void shutdown()
      Stop the transport. To ensure no loss of data, the transport should continue to supply any queued data to its DataReceiver.
      Specified by:
      shutdown in interface DCTransport
      Specified by:
      shutdown in class EITransport
    • initialize

      public void initialize() throws Exception
      This function is used to create and initialize the Transport's components.
      Throws:
      Exception
    • initFilenameFilter

      protected void initFilenameFilter() throws Exception
      This function is used to initialize the filename filter
      Throws:
      Exception
    • initStreamSource

      protected abstract void initStreamSource() throws Exception
      This is to be implemented by subclasses for various transportation types.
      Throws:
      Exception