Home Manual Reference Source Test
import NodeStream from 'atscm/src/lib/server/NodeStream.js'
public class | source

NodeStream

Extends:

stream~Readable → NodeStream

A stream of server nodes.

Constructor Summary

Public Constructor
public

constructor(nodesToBrowse: NodeId[], options: Object)

Creates new node stream.

Member Summary

Public Members
public get

If the stream is destoyed.

public get

The number of processed chunks per second.

public get

The number of processed nodes.

public

If the discovered nodes should be browsed as well.

Private Members
private

The stream's browser

private

If the stream is destroyed.

private

The timestamp when the stream started.

Method Summary

Private Methods
private

_destroy(err: Error, callback: function(err: ?Error): void)

Destroys the stream.

private

_read()

Starts the browser.

Public Constructors

public constructor(nodesToBrowse: NodeId[], options: Object) source

Creates new node stream.

Params:

NameTypeAttributeDescription
nodesToBrowse NodeId[]

The nodes to browse.

options Object
  • optional

The options to use.

options.recursive boolean
  • optional

If the stream should recurse child nodes.

options.ignoreNodes NodeId[]
  • optional

The nodes to ignore.

Test:

Public Members

public get isDestroyed: boolean source

If the stream is destoyed.

public get opsPerSecond: number source

The number of processed chunks per second.

public get processed: number source

The number of processed nodes.

public recursive: Boolean source

If the discovered nodes should be browsed as well.

Private Members

private _browser: NodeBrowser source

The stream's browser

private _isDestroyed: boolean source

If the stream is destroyed.

private _start: number source

The timestamp when the stream started.

Private Methods

private _destroy(err: Error, callback: function(err: ?Error): void) source

Destroys the stream.

Params:

NameTypeAttributeDescription
err Error
  • nullable: true

The error that caused the destroy.

callback function(err: ?Error): void

Called once finished.

private _read() source

Starts the browser.