Package de.sfuhrm.radiorecorder
Class ConnectionHandler
- java.lang.Object
-
- de.sfuhrm.radiorecorder.ConnectionHandler
-
public class ConnectionHandler extends Object
Handles a singleHttpConnectionto an internet radio.- Author:
- Stephan Fuhrmann
-
-
Constructor Summary
Constructors Constructor Description ConnectionHandler(ConsumerContext consumerContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidconfigure(HttpConnectionBuilder builder)protected voidconfigureClient(HttpConnectionBuilder builder)Set headers for user client.protected voidconfigureIcecast(HttpConnectionBuilder builder)Set headers to motivate Icecast servers to send meta data.protected voidconfigureProxy(HttpConnectionBuilder builder)Configure the proxy for the connection.protected voidconfigureTimeout(HttpConnectionBuilder builder)Configure the timeout for the connection.voidconsume(URL url)Consumes the given URL.
-
-
-
Constructor Detail
-
ConnectionHandler
public ConnectionHandler(ConsumerContext consumerContext)
-
-
Method Detail
-
configureTimeout
protected void configureTimeout(HttpConnectionBuilder builder)
Configure the timeout for the connection.- Parameters:
builder- the connection to configure.
-
configureProxy
protected void configureProxy(HttpConnectionBuilder builder)
Configure the proxy for the connection.- Parameters:
builder- the connection to configure.
-
configureIcecast
protected void configureIcecast(HttpConnectionBuilder builder)
Set headers to motivate Icecast servers to send meta data.- Parameters:
builder- the connection to configure.- See Also:
- ID3 and icecast
-
configureClient
protected void configureClient(HttpConnectionBuilder builder)
Set headers for user client.- Parameters:
builder- the connection to configure.
-
configure
protected void configure(HttpConnectionBuilder builder) throws IOException
- Throws:
IOException
-
consume
public void consume(URL url)
Consumes the given URL.- Parameters:
url- the URL to process. Must be non-null.
-
-