Class: MetadataProvider

lightstreamer-adapter/metadataprovider~ MetadataProvider

new MetadataProvider

Metadata provider constructor.
This object extends the EventEmitter object and emits the following events:
  • getItemData: function(request, response) {}
  • getUserItemData: function(request, response) {}
  • getSchema: function(request, response) {}
  • getItems: function(request, response) {}
  • notifyUser: function(request, response) {}
  • notifyUserAuth: function(request, response) {}
  • notifyUserMessage: function(request, response) {}
  • notifyNewSession: function(request, response) {}
  • notifySessionClose: function(request, response) {}
  • notifyNewTables: function(request, response) {}
  • notifyTablesClose: function(request, response) {}
The response argument is a MetadataResponse object and one of its methods, error or success, must be called in order to reply to the request bound to the event.
The request object is an associative array containing different data according to the specific request:
  • getItemData: {itemNames: [<item name 1> ... <item name n>]}
  • getUserItemData: {userName: <username>, itemNames: [<item name 1> ... <item name n>]}
  • getSchema: {userName: <username>, groupName: <group name>, schemaName: <schema name>, sessionId: <session id>}
  • getItems: {userName: <username>, groupName: <group name>, sessionId: <session id>}
  • notifyUser: {userName: <username>, userPassword: <password>, headers: {<name 1>: <value 1> ... <name n>: <value n>} }
  • notifyUserAuth: {userName: <username>, userPassword: <password>, clientPrincipal: <client principal>, headers: {<name 1>: <value 1> ... <name n>: <value n>} }
  • notifyUserMessage: {userName: <username>, sessionId: <session id>, userMessage: <message>}
  • notifyNewSession: {userName: <username>, sessionId: <session id>, contextProperties: {<name 1>: <val 1> ... <name n>: <value n>}}
  • notifySessionClose: {sessionId: <session id>}
  • notifyNewTables: {userName: <username>, sessionId: <session id>, tableInfos: [{winIndex: <win index>, pubModes: <publish mode>, groupName: <group name>, schemaName: <schema name>, firstItemIndex: <first index>, lastItemIndex: <last index>, selector: <selector>}, ...]}
  • notifyTablesClose: {sessionId: <session id>, } tableInfos: [{winIndex: <win index>, pubModes: <publish mode>, groupName: <group name>, schemaName: <schema name>, firstItemIndex: <first index>, lastItemIndex: <last index>, selector: <selector>}, ...]}
Parameters:
Name Type Argument Description
stream Stream the stream channel to the remote LS proxy adapter
params Object <optional>
optional parameter used to by the default request handlers. By default
  • maxBandwidth: 0.0
  • notifyTables: false
  • minSourceFreq: 0.0
  • distinctSnapLen: 0
  • itemAllowedModes: {raw: true, merge: true, distinct: true, command: true}
  • allowedMaxItemFreq: 0.0
  • allowedBufferSize: 0

Method Summary

getStream
Returns the configured stream.

Method Detail

<inner> getStream

Returns the configured stream.
Returns:
Object the stream