public interface SampleConsumer extends SampleProcessor
A sample consumer is meant to consume samples in order to process them.
A sample consumer can consume samples on different channels and each channel is assigned a single metadata structure.
A sample consumer is passive, meaning that its
must be called by a third party object.
Sample metadata must be provided to the consumer before
startConsuming() is called.
The following sequence must be observed when consuming samples :
setConsumedMetadata()for each channel that will consume samples
startConsuming()before any call to
consume()for each sample to be consumed by the consumer, specify the channel on which to consume
stopConsuming()after every sample has been consumed
|Modifier and Type||Method and Description|
Consumes the specified sample ton the specified channel.
Set the metadata of samples that will be consumed on the specified channel.
Start the sample consuming.
Stops the consuming process.
void setConsumedMetadata(SampleMetadata sampleMetadata, int channel)
sampleMetadata- The sample metadata that are being consumed for the associated channel
channel- The channel whose sample metadata are being defined
void consume(Sample s, int channel)
s- The sample to be consumed
channel- The channel on which the sample is consumed
Copyright © 1998-2021 Apache Software Foundation. All Rights Reserved.