Package de.sfuhrm.radiorecorder
Klasse 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.
- Autor:
- Stephan Fuhrmann
-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungConsumerContext(int id, Radio radio, Params params) Constructor for a consumer context. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungGet the amount of bytes after which to abort.Get 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.
-
Konstruktordetails
-
ConsumerContext
Constructor for a consumer context.- Parameter:
id- numerical unique id of this context.radio- the radio station to process in this context.params- the command line parameters.
-
-
Methodendetails
-
getTimeout
public int getTimeout()Get the read/connect timeout in millis.- Gibt zurück:
- the timeout in milliseconds.
-
getTargetDirectory
Get the directory to write files to.- Gibt zurück:
- directory to write files to.
-
getMinFree
public long getMinFree()Get minimum free bytes.- Gibt zurück:
- minimum number of free bytes on disk.
-
getAbortAfterFileLength
Get the amount of bytes after which to abort.- Gibt zurück:
- optional maximum of bytes after which to abort writing to write to disk.
-
getAbortAfterDuration
Get the amount of bytes after which to abort.- Gibt zurück:
- optional maximum of milliseconds to record.
-
isPlaying
public boolean isPlaying()Whether to play or store.- Gibt zurück:
trueif playing was requested on the command line,falseotherwise.
-
isSongNames
public boolean isSongNames()Whether to name the files after the metadata retrieved.- Gibt zurück:
trueif metadata naming was requested on the command line,falseotherwise.
-
isReconnect
public boolean isReconnect()Reconnect forever.- Gibt zurück:
trueif reconnecting was requested on the command line,falseotherwise.
-
getCastReceiver
The cast device to cast to.- Gibt zurück:
- the name of the chrome cast receiver to play on.
-
getMixerInfo
The mixer to play on.- Gibt zurück:
- the mixer info to play on, or
nullif the default is ok.
-
getHttpClient
The client type to use.- Gibt zurück:
- the HTTP client type requested in the command line.
-
getProxy
The HTTP proxy to use or NULL.- Gibt zurück:
- the HTTP proxy requested in the command line.
-