51Degrees Pipeline Node.js  4.1

51Degrees Pipeline for Node.js

CloudRequestEngine Class Reference

Inheritance diagram for CloudRequestEngine:

[legend]

Collaboration diagram for CloudRequestEngine:

[legend]

Public Member Functions

 constructor ({ resourceKey, licenseKey, baseURL='https:})
Constructor for CloudRequestEngine. More...
 ready ()
Function for testing if the cloud engine is ready Checks to see if properties and evidence keys have been fetched. More...
 processInternal (flowData)
Internal process for cloud engine Returns raw JSON as a "cloud" property in "cloud". More...
 fetchProperties ()
Internal process to fetch all the properties available under a resourcekey. More...
 getData (flowData)
Internal function to get data from cloud service. More...
 getEvidenceKeys ()
Internal function to get evidenceKeys used by cloud resourceky. More...

Public Member Functions inherited from Engine

 constructor ({ cache, restrictedProperties, dataFile }={})
Constructor for an Engine. More...
 inCache (flowData)
Checks cache and returns cached result if found. More...
 process (flowData)
An engine's process function checks cache for an item (calling inCache) If found it returns the cached object If not found it runs the standard processInternal function and adds it to the cache (if a cache is present) More...
 refresh ()
Callback which runs when an attached DataFile is updated Needs to be overriden by a specific engine to do anything. More...
 registerDataFile (dataFile)
Function to attach a DataFile to the engine and register it with a DataFileUpdateService if needed. More...

Public Member Functions inherited from FlowElement

 constructor ({ processInternal, dataKey, properties={}, evidenceKeyFilter }={})
Constructor for flowElement class. More...
 onRegistration (pipeline, flowElement)
Internal function to be called when a FlowElement is added to pipeline, runs through any registrationCallbacks on the FlowElement. More...
 ready ()
Function called to check if a FlowElement is ready Used when there are asynchronous initialisation steps. More...
 processInternal (flowData)
Internal process function for a particular flowElement called (via the flowElement.process() method) when flowData generated by a pipleline is processsed. More...
 process (flowData)
To allow actions to take place before and after a FlowElement's processInternal function runs, a process wrapper is run first. More...
 updateProperties ()
Call this function to update the properties meta database in all the pipelines this flowElement has been added to. More...
 getProperties ()
Get a flowElement's properties. More...

Member Function Documentation

◆ constructor()

CloudRequestEngine::constructor (   { resourceKey, licenseKey, baseURL='https:} )
inline

Constructor for CloudRequestEngine.

Parameters
{object} - options options object
{string} - options.resourceKey resourcekey for cloud service
{string} - options.licenseKey licensekey for cloud service
{string} - options.baseURL url the cloud service is located at if overriding default

◆ fetchProperties()

CloudRequestEngine::fetchProperties ( )
inline

Internal process to fetch all the properties available under a resourcekey.

Returns
{Promise} properties from the cloud server

◆ getData()

CloudRequestEngine::getData (   flowData )
inline

Internal function to get data from cloud service.

Parameters
{FlowData} - flowData FlowData used to extract evidence and send to cloud service for processing
Returns
{Promise} result of processing

◆ getEvidenceKeys()

CloudRequestEngine::getEvidenceKeys ( )
inline

Internal function to get evidenceKeys used by cloud resourceky.

Returns
{Array} evidence key list

◆ processInternal()

CloudRequestEngine::processInternal (   flowData )
inline

Internal process for cloud engine Returns raw JSON as a "cloud" property in "cloud".

Parameters
{FlowData} - flowData flowData to process
Returns
{Promise} data from cloud service

◆ ready()

CloudRequestEngine::ready ( )
inline

Function for testing if the cloud engine is ready Checks to see if properties and evidence keys have been fetched.

Returns
{Promise} whether ready