\r\n

51Degrees Pipeline Node.js  4.4

51Degrees Pipeline for Node.js

DataFileUpdateService Class Reference

Detailed Description

Datafiles attached to FlowElements register with the dataFileUpdateService so the datafiles can receive automatic updates.

Public Member Functions

 constructor (pipeline)
Constructor for a DataFileUpdateService. More...
 registerPipeline (pipeline)
Method to register a pipeline with the update service. More...
 on (listener, callback)
EventEmitter's 'on' delegation. More...
 once (listener, callback)
EventEmitter's 'once' delegation. More...
 updateDataFile (dataFile)
Method that updates a datafile when it is due an update. More...
 fileReady (dataFile, filename)
Internal method called when the datafile has been downloaded and is ready after an update. More...
 processFile (dataFile, filename)
Internal method to process the datafile has been downloaded Including unzipping if needed. More...
 checkNextUpdate (dataFile)
Internal method to check the next update of a datafile at a polling interval set on the datafile. More...
 registerDataFile (dataFile)
Method that registers a datafile with the update service. More...

Member Function Documentation

◆ checkNextUpdate()

DataFileUpdateService::checkNextUpdate (   dataFile )
inline

Internal method to check the next update of a datafile at a polling interval set on the datafile.

Parameters
{DataFile} - dataFile the datafile to check updates for

◆ constructor()

DataFileUpdateService::constructor (   pipeline )
inline

Constructor for a DataFileUpdateService.

Parameters
{Pipeline} - [pipeline] pipeline the update service is attached to

@type {EventEmitter}

◆ fileReady()

DataFileUpdateService::fileReady (   dataFile,
  filename  
)
inline

Internal method called when the datafile has been downloaded and is ready after an update.

Parameters
{DataFile} - dataFile the datafile that is ready
{string} - filename the filename of the updated datafile
Returns
{void}

◆ on()

DataFileUpdateService::on (   listener,
  callback  
)
inline

EventEmitter's 'on' delegation.

Parameters
{string - | symbol} listener listener
{Function} - callback callback

◆ once()

DataFileUpdateService::once (   listener,
  callback  
)
inline

EventEmitter's 'once' delegation.

Parameters
{string - | symbol} listener listener
{Function} - callback callback

◆ processFile()

DataFileUpdateService::processFile (   dataFile,
  filename  
)
inline

Internal method to process the datafile has been downloaded Including unzipping if needed.

Parameters
{DataFile} - dataFile the datafile to processs
{string} - filename the filename of the downloaded data

◆ registerDataFile()

DataFileUpdateService::registerDataFile (   dataFile )
inline

Method that registers a datafile with the update service.

Parameters
{DataFile} - dataFile the datafile to register

◆ registerPipeline()

DataFileUpdateService::registerPipeline (   pipeline )
inline

Method to register a pipeline with the update service.

Parameters
{Pipeline} - [pipeline] Pipeline to register

◆ updateDataFile()

DataFileUpdateService::updateDataFile (   dataFile )
inline

Method that updates a datafile when it is due an update.

Parameters
{DataFile} - dataFile the datafile to update
Returns
{boolean | void} returns false if already updating or request failed