Implementation of a Client that connects to a stream using an HTTP GET that typically never closes.
More...
|
|
void | connect () throws Exception |
| |
| void | disconnect () |
| |
| void | setUserAgent (String userAgent) |
| | Sets the User Agent used when connecting.
|
| |
| void | connect (URI uri) |
| | Connects the client to the given URI and start streaming.
|
| |
|
void | stop () |
| | Trigger the disconnection if already connected.
|
| |
| void | setDataReceivedListener (DataReceivedListener listener) |
| | Sets the listener notified whenever a chunk of data is downloaded.
|
| |
|
void | setStateChangedListener (StateChangedListener stateChangedListener) |
| | Sets the listener to be notified about the various state change on the client.
|
| |
|
State | getState () |
| | Gets the current state of the client.
|
| |
|
StreamContainerDecoder | getStreamContainerDecoder () |
| |
|
void | setStreamContainerDecoder (StreamContainerDecoder streamContainerDecoder) |
| |
|
| void | startConnectingInBackground () |
| |
|
void | appendUrlHeaders (HttpURLConnection urlConnection) |
| | Appends the headers required for this type of connection to the header of the HTTP GET request.
|
| |
| void | receiveResponse (HttpURLConnection urlConnection) throws IOException |
| | Receive the response from the server.
|
| |
| void | DebugLog (HttpURLConnection urlConnection) |
| | Prints the content of a response (return code + headers).
|
| |
| void | onConnected () |
| | Called when the child class connects to a server.
|
| |
| void | onDisconnected () |
| | Called when the child class disconnected.
|
| |
| void | onError (ErrorDetail errorDetail) |
| | Called when the child class encounters an error.
|
| |
| void | onMessageReceived (byte[] buffer, int bufferLength) |
| | Called when the child class receives data.
|
| |
|
|
static final String | TAG = "Client" |
| |
|
DataReceivedListener | mDataReceivedListener |
| |
|
StreamContainerDecoder | streamContainerDecoder |
| |
|
URI | mUri |
| |
|
String | mUserAgent = "TritonDigital Streaming Proxy" |
| |
Implementation of a Client that connects to a stream using an HTTP GET that typically never closes.
◆ DebugLog()
| void com.tritondigital.net.streaming.proxy.client.http.HttpClient.DebugLog |
( |
HttpURLConnection |
urlConnection | ) |
|
|
protected |
Prints the content of a response (return code + headers).
Does not print the content.
◆ disconnect()
| void com.tritondigital.net.streaming.proxy.client.http.HttpClient.disconnect |
( |
| ) |
|
◆ receiveResponse()
| void com.tritondigital.net.streaming.proxy.client.http.HttpClient.receiveResponse |
( |
HttpURLConnection |
urlConnection | ) |
throws IOException |
|
protected |
Receive the response from the server.
Infinite loop, that ends when the client is closed that pushes all the data to the parent class, which in turn pushes it to the listener.
- Parameters
-
| urlConnection | The connection that received the data. |
◆ startConnectingInBackground()
| void com.tritondigital.net.streaming.proxy.client.http.HttpClient.startConnectingInBackground |
( |
| ) |
|
|
protected |
The documentation for this class was generated from the following file:
- streamingproxy/src/main/java/com/tritondigital/net/streaming/proxy/client/http/HttpClient.java