Home Reference Source
import {DataProcessor} from 'rabbit-hole'
public class | source

DataProcessor

A volume data processor.

Constructor Summary

Public Constructor
public

Constructs a new data processor.

Member Summary

Protected Members
protected

A set of Hermite data that will be used during processing.

protected

A container for the data that will be returned to the main thread.

Method Summary

Public Methods
public

createTransferList(transferList: Array): Transferable[]

Creates a list of transferable items.

public

Returns the data of this processor.

public

Processes the given request.

public

Prepares a response that can be send back to the main thread.

Public Constructors

public constructor() source

Constructs a new data processor.

Protected Members

protected data: HermiteData source

A set of Hermite data that will be used during processing.

protected response: DataMessage source

A container for the data that will be returned to the main thread.

Public Methods

public createTransferList(transferList: Array): Transferable[] source

Creates a list of transferable items.

Params:

NameTypeAttributeDescription
transferList Array
  • optional

An optional target list. The transferable items will be added to this list.

Return:

Transferable[]

The transfer list.

public getData(): HermiteData source

Returns the data of this processor.

Return:

HermiteData

The data.

public process(request: DataMessage): DataProcessor source

Processes the given request.

Params:

NameTypeAttributeDescription
request DataMessage

A request.

Return:

DataProcessor

This processor.

public respond(): DataMessage source

Prepares a response that can be send back to the main thread.

Should be used together with DataProcessor#createTransferList.

Return:

DataMessage

A response.