Class ConsumerContext


  • public class ConsumerContext
    extends Object
    Immutable context common to all consumers. Holds the data necessary to record or play one stream from one radio station.
    Author:
    Stephan Fuhrmann
    • Constructor Detail

      • ConsumerContext

        public ConsumerContext​(int id,
                               URL url,
                               File directory,
                               Params params)
    • Method Detail

      • getTimeout

        public int getTimeout()
        Get the read/connect timeout in millis.
        Returns:
        the timeout in milliseconds.
      • getMinFree

        public long getMinFree()
        Get minimum free bytes.
        Returns:
        minimum number of free bytes on disk.
      • getAbortAfter

        public Optional<Long> getAbortAfter()
        Get the amount of bytes after which to abort.
        Returns:
        optional maximum of bytes after which to abort writing to write to disk.
      • isPlaying

        public boolean isPlaying()
        Whether to play or store.
      • isSongNames

        public boolean isSongNames()
        Whether to name the files after the metadata retrieved.
      • isReconnect

        public boolean isReconnect()
        Reconnect forever.
      • getCastReceiver

        public String getCastReceiver()
        The cast device to cast to.
      • getMixerInfo

        public Mixer.Info getMixerInfo()
        The mixer to play on.
      • getProxy

        public URL getProxy()
        The HTTP proxy to use or NULL.