Triton Mobile SDK for Android 3.5.1 This is a custom android player made by Triton Digital

Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
com.tritondigital.net.streaming.proxy.client.http.HttpClient Class Reference

Implementation of a Client that connects to a stream using an HTTP GET that typically never closes. More...

Inheritance diagram for com.tritondigital.net.streaming.proxy.client.http.HttpClient:

## Public Member Functions
void | connect () throws Exception
void | disconnect ()
Public Member Functions inherited from com.tritondigital.net.streaming.proxy.client.Client
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)

## Protected Member Functions
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).
Protected Member Functions inherited from com.tritondigital.net.streaming.proxy.client.Client
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.

## Additional Inherited Members
Static Public Attributes inherited from com.tritondigital.net.streaming.proxy.client.Client
static final String | TAG = "Client"
Protected Attributes inherited from com.tritondigital.net.streaming.proxy.client.Client
DataReceivedListener | mDataReceivedListener
StreamContainerDecoder | streamContainerDecoder
URI | mUri
String | mUserAgent = "TritonDigital Streaming Proxy"

## Detailed Description

Implementation of a Client that connects to a stream using an HTTP GET that typically never closes.

## Member Function Documentation

## ◆ 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 | ( |  | ) |

Reimplemented from com.tritondigital.net.streaming.proxy.client.Client.

## ◆ 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

Reimplemented from com.tritondigital.net.streaming.proxy.client.Client.

The documentation for this class was generated from the following file:

- sdk/src/main/java/com/tritondigital/net/streaming/proxy/client/http/HttpClient.java