Package de.sfuhrm.radiorecorder
Class ConsumerContext
java.lang.Object
de.sfuhrm.radiorecorder.ConsumerContext
Immutable context common to all consumers.
Holds the data necessary to record or play one stream from one
radio station.
- Author:
- Stephan Fuhrmann
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the amount of bytes after which to abort.The cast device to cast to.The client type to use.longGet minimum free bytes.The mixer to play on.getProxy()The HTTP proxy to use or NULL.Get the directory to write files to.intGet the read/connect timeout in millis.booleanWhether to play or store.booleanReconnect forever.booleanWhether to name the files after the metadata retrieved.
-
Constructor Details
-
ConsumerContext
- Throws:
MalformedURLException
-
-
Method Details
-
getTimeout
public int getTimeout()Get the read/connect timeout in millis.- Returns:
- the timeout in milliseconds.
-
getTargetDirectory
Get the directory to write files to.- Returns:
- directory to write files to.
-
getMinFree
public long getMinFree()Get minimum free bytes.- Returns:
- minimum number of free bytes on disk.
-
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.- Returns:
trueif playing was requested on the command line,falseotherwise.
-
isSongNames
public boolean isSongNames()Whether to name the files after the metadata retrieved.- Returns:
trueif meta data naming was requested on the command line,falseotherwise.
-
isReconnect
public boolean isReconnect()Reconnect forever.- Returns:
trueif reconnecting was requested on the command line,falseotherwise.
-
getCastReceiver
The cast device to cast to.- Returns:
- the name of the chrome cast receiver to play on.
-
getMixerInfo
The mixer to play on.- Returns:
- the mixer info to play on, or
nullif the default is ok.
-
getHttpClient
The client type to use.- Returns:
- the HTTP client type requested in the command line.
-
getProxy
The HTTP proxy to use or NULL.- Returns:
- the HTTP proxy requested in the command line.
-