51Degrees Pipeline Node.js  4.4

51Degrees Pipeline for Node.js

ShareUsage Class Reference

Detailed Description

The ShareUsage element sends usage data to 51Degrees in zipped batches.

Inheritance diagram for ShareUsage:


Collaboration diagram for ShareUsage:


Public Member Functions

 constructor ({ interval=1200000, requestedPackageSize=10, cookie, queryWhitelist, headerBlacklist, sharePercentage=1, endpoint='https:}={})
Constructor for ShareUsage engine. More...
 switch (this.endpoint.protocol)

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...
 _log (type, message)

Data Fields

this  endpoint = url.parse(endpoint)

Member Function Documentation

◆ constructor()

ShareUsage::constructor (   { interval=1200000, requestedPackageSize=10, cookie, queryWhitelist, headerBlacklist, sharePercentage=1, endpoint='https:} = {} )

Constructor for ShareUsage engine.

{object} - options settings object for share usage.
{number} - options.interval If exactly the same evidence values are seen multiple times within this time limit (in milliseconds) then they will only be shared once.
{number} - options.requestedPackageSize The usage element will group data into single requests before sending it. This setting controls the minimum number of entries before data is sent. If you are sharing large amounts of data, increasing this value is recommended in order to reduce the overhead of sending HTTP messages. For example, the 51Degrees cloud service uses a value of 2500.
{string} - options.cookie if a cookie is being used to identify user sessions, it can be specified here in order to reduce the sharing of duplicated data.
{Array} - options.queryWhitelist By default query string and HTTP form parameters are not shared unless prefixed with '51D_'. If you need to share query string parameters, a list can be specified here.
{Array} - options.headerBlacklist By default, all HTTP headers (except a few, such as Cookies) are shared. Individual headers can be excluded from sharing by adding them to this list.
{number} - options.sharePercentage approximate proportion of requests to be shared. 1 = 100%, 0.5 = 50%, etc..