Interface SampleProcessor

  • All Implemented Interfaces:

    
    public interface SampleProcessor
    
                        

    Defines a sample processor.

    Basically a sample processor is meant to process samples. There is currently 2 kinds of sample processors :

    • SampleConsumer : sample consumers are sample processors meant to consume samples
    • SampleProducer : sample producers are sample processors meant to produce samples
    Since:

    3.0

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract SampleContext getSampleContext() Gets the sample context.
      abstract void setSampleContext(SampleContext ctx) Set sample context that this consumer should rely on.
      abstract void setChannelAttribute(int channel, String key, Object value) Associate an attribute to the specified channel for this sample processor If the attribute already exist, it is replaced.
      abstract Object getChannelAttribute(int channel, String key) Return an attribute value associated on a channel on this sample processor
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • setSampleContext

         abstract void setSampleContext(SampleContext ctx)

        Set sample context that this consumer should rely on.

        Parameters:
        ctx - the new sample context
      • setChannelAttribute

         abstract void setChannelAttribute(int channel, String key, Object value)

        Associate an attribute to the specified channel for this sample processor If the attribute already exist, it is replaced.

        Parameters:
        channel - The channel number to associate the attribute on
        key - The attribute key
        value - The attribute value to be set
      • getChannelAttribute

         abstract Object getChannelAttribute(int channel, String key)

        Return an attribute value associated on a channel on this sample processor

        Parameters:
        channel - The channel on which the attribute is associated
        key - The attribute key to be retrieved
        Returns:

        The attribute value or null if none is found for the specified key