new AbstractOperator()
Abstract operator stream Base class to simplify writing of unbuffered data processor streams (filter, map)
- Since:
-
- 0.2.5
- Implements:
Methods
-
<protected> _writeData(data)
-
Waits for the read API to write it out
Parameters:
Name Type Description data
* Data to write
- Since:
-
- 0.2.5
Returns:
Resolved when write operation has been done on output
- Type
- Promise
-
flush()
-
Request buffered data to be flushed. It does not need to wait for subsequent reads.
- Since:
-
- 0.2.5
- Implements:
Returns:
Resolved when ready
- Type
- Promise
-
read(output)
-
Read all data from the underlying source. Chunk of data is passed to the gpf.interfaces.IWritableStream.
Parameters:
Name Type Description output
gpf.interfaces.IWritableStream Stream that receives chunk of data
- Since:
-
- 0.2.5
- Implements:
Returns:
Resolved when the stream has ended
- Type
- Promise
-
write(data)
-
Write data to the underlying destination
Parameters:
Name Type Description data
* Data to write
- Since:
-
- 0.2.5
- Implements:
Returns:
Resolved when ready
- Type
- Promise