51Degrees Pipeline for Node.js

Pipeline Class Reference

Detailed Description

Pipeline holding a list of flowElements for processing, can create flowData that will be passed through these, collecting elementData Should be constructed through the PipelineBuilder class.

Examples
usageSharing/usageSharing.js.

Public Member Functions

 constructor (flowElements=[], suppressProcessExceptions=false, dataFileUpdateService=null)
 Constructor for Pipeline.
 getElement (key)
 get a FlowElement by its dataKey
 on (listener, callback)
 Method to attach listeners to the logger Shorthand access to the enclosed event emitter.
 log (type, message)
 Shorthand to trigger a message on the pipeline's eventEmitter.
 createFlowData ()
 Create a FlowData element from the pipeline.
 updatePropertyDataBaseForElement (flowElement)
 Update pipeline's property database for FlowElement.

Member Function Documentation

◆ constructor()

Pipeline::constructor ( flowElements = [],
suppressProcessExceptions = false,
dataFileUpdateService = null )
inline

Constructor for Pipeline.

Parameters
{FlowElement[]}flowElements list of FlowElements to add to the Pipeline
{boolean}suppressProcessExceptions If true then pipeline will suppress exceptions added to FlowData.
{DataFileUpdateService}dataFileUpdateService Service that registers FlowElements

A logger for emitting messages @type {EventEmitter}

@type {object}

@type {object}

◆ createFlowData()

Pipeline::createFlowData ( )
inline

Create a FlowData element from the pipeline.

Returns
{FlowData} a FlowData object for the Pipeline containing methods for adding evidence and processing via the FlowElements in the Pipleine.

◆ getElement()

Pipeline::getElement ( key)
inline

get a FlowElement by its dataKey

Parameters
{string}key the datakey of the FlowElement
Returns
{FlowElement} the FlowElement for the datakey

◆ log()

Pipeline::log ( type,
message )
inline

Shorthand to trigger a message on the pipeline's eventEmitter.

Parameters
{string}type type of message
{*}message message to store in the log

◆ on()

Pipeline::on ( listener,
callback )
inline

Method to attach listeners to the logger Shorthand access to the enclosed event emitter.

Parameters
{string}listener type of message to listen to
{Function}callback a callback to react to the log

◆ updatePropertyDataBaseForElement()

Pipeline::updatePropertyDataBaseForElement ( flowElement)
inline

Update pipeline's property database for FlowElement.

Parameters
{FlowElement}flowElement FlowElement to update
Returns
{void}