51Degrees Pipeline Node.js  4.1

51Degrees Pipeline for Node.js

CloudEngine Class Reference

Detailed Description

This is a template for all 51Degrees cloud engines.

It requires the 51Degrees cloudRequestEngine to be placed in a pipeline before it. It takes that raw JSON response and parses it to extract the device part. It also uses this data to generate a list of properties and an evidence key filter

Inheritance diagram for CloudEngine:

[legend]

Collaboration diagram for CloudEngine:

[legend]

Public Member Functions

 constructor ()
 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 method for all cloud engines. 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

◆ processInternal()

CloudEngine::processInternal (   flowData )
inline

Internal process method for all cloud engines.

Parameters
{FlowData} - flowData FlowData to process
Returns
{void}

◆ ready()

CloudEngine::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