\doxysection{com.\+tritondigital.\+net.\+streaming.\+proxy.\+client.\+http.\+Http\+Client Class Reference}
\hypertarget{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1client_1_1http_1_1HttpClient}{}\label{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1client_1_1http_1_1HttpClient}\index{com.tritondigital.net.streaming.proxy.client.http.HttpClient@{com.tritondigital.net.streaming.proxy.client.http.HttpClient}}


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


Inheritance diagram for com.\+tritondigital.\+net.\+streaming.\+proxy.\+client.\+http.\+Http\+Client\+:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1client_1_1http_1_1HttpClient}
\end{center}
\end{figure}
\doxysubsubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\Hypertarget{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1client_1_1http_1_1HttpClient_af7fbba27e2cbe9a1207ae027513a2ce5}\label{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1client_1_1http_1_1HttpClient_af7fbba27e2cbe9a1207ae027513a2ce5} 
void {\bfseries connect} ()  throws Exception 
\item 
void \mbox{\hyperlink{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1client_1_1http_1_1HttpClient_a3b0f6c06ab3e427a093b6db91216db65}{disconnect}} ()
\end{DoxyCompactItemize}
\doxysubsection*{Public Member Functions inherited from \mbox{\hyperlink{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1client_1_1Client}{com.\+tritondigital.\+net.\+streaming.\+proxy.\+client.\+Client}}}
\begin{DoxyCompactItemize}
\item 
void \mbox{\hyperlink{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1client_1_1Client_ad6ca5711b4ae05fb58d2d76fcec92220}{set\+User\+Agent}} (String user\+Agent)
\begin{DoxyCompactList}\small\item\em Sets the User Agent used when connecting. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1client_1_1Client_aa9e5baaec2c4e5a22dcfbfaf4501028f}{connect}} (URI uri)
\begin{DoxyCompactList}\small\item\em Connects the client to the given URI and start streaming. \end{DoxyCompactList}\item 
void {\bfseries stop} ()
\begin{DoxyCompactList}\small\item\em Trigger the disconnection if already connected. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1client_1_1Client_aecdebac949aba4c5ff5aa06e80a7b885}{set\+Data\+Received\+Listener}} (\mbox{\hyperlink{interfacecom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1client_1_1Client_1_1DataReceivedListener}{Data\+Received\+Listener}} listener)
\begin{DoxyCompactList}\small\item\em Sets the listener notified whenever a chunk of data is downloaded. \end{DoxyCompactList}\item 
void {\bfseries set\+State\+Changed\+Listener} (\mbox{\hyperlink{interfacecom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1client_1_1Client_1_1StateChangedListener}{State\+Changed\+Listener}} state\+Changed\+Listener)
\begin{DoxyCompactList}\small\item\em Sets the listener to be notified about the various state change on the client. \end{DoxyCompactList}\item 
\mbox{\hyperlink{enumcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1client_1_1Client_1_1State}{State}} {\bfseries get\+State} ()
\begin{DoxyCompactList}\small\item\em Gets the current state of the client. \end{DoxyCompactList}\item 
Stream\+Container\+Decoder {\bfseries get\+Stream\+Container\+Decoder} ()
\item 
void {\bfseries set\+Stream\+Container\+Decoder} (Stream\+Container\+Decoder stream\+Container\+Decoder)
\end{DoxyCompactItemize}
\doxysubsubsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
void \mbox{\hyperlink{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1client_1_1http_1_1HttpClient_a253dbdff477a43f3e89e1aa4f5aa03a4}{start\+Connecting\+In\+Background}} ()
\item 
\Hypertarget{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1client_1_1http_1_1HttpClient_a67b9c1e13648c30a81bbca081e4410f0}\label{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1client_1_1http_1_1HttpClient_a67b9c1e13648c30a81bbca081e4410f0} 
void {\bfseries append\+Url\+Headers} (Http\+URLConnection url\+Connection)
\begin{DoxyCompactList}\small\item\em Appends the headers required for this type of connection to the header of the HTTP GET request. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1client_1_1http_1_1HttpClient_a0db0346beaf5f66a46550bfd3445efd2}{receive\+Response}} (Http\+URLConnection url\+Connection)  throws IOException 
\begin{DoxyCompactList}\small\item\em Receive the response from the server. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1client_1_1http_1_1HttpClient_ac859110299b27be3bcd13d52326a7979}{Debug\+Log}} (Http\+URLConnection url\+Connection)
\begin{DoxyCompactList}\small\item\em Prints the content of a response (return code + headers). \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Protected Member Functions inherited from \mbox{\hyperlink{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1client_1_1Client}{com.\+tritondigital.\+net.\+streaming.\+proxy.\+client.\+Client}}}
\begin{DoxyCompactItemize}
\item 
void \mbox{\hyperlink{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1client_1_1Client_a0a4a3d495c473483b14c783e2d675759}{on\+Connected}} ()
\begin{DoxyCompactList}\small\item\em Called when the child class connects to a server. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1client_1_1Client_a0bc40358589a266ad985698e9bd1e350}{on\+Disconnected}} ()
\begin{DoxyCompactList}\small\item\em Called when the child class disconnected. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1client_1_1Client_a806b760ed62b1ad7b9825d98fc6de531}{on\+Error}} (Error\+Detail error\+Detail)
\begin{DoxyCompactList}\small\item\em Called when the child class encounters an error. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1client_1_1Client_aaac4cdade357a57672e154e8316e4c4d}{on\+Message\+Received}} (byte\mbox{[}$\,$\mbox{]} buffer, int buffer\+Length)
\begin{DoxyCompactList}\small\item\em Called when the child class receives data. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Additional Inherited Members}
\doxysubsection*{Static Public Attributes inherited from \mbox{\hyperlink{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1client_1_1Client}{com.\+tritondigital.\+net.\+streaming.\+proxy.\+client.\+Client}}}
\begin{DoxyCompactItemize}
\item 
static final String {\bfseries TAG} = "{}Client"{}
\end{DoxyCompactItemize}
\doxysubsection*{Protected Attributes inherited from \mbox{\hyperlink{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1client_1_1Client}{com.\+tritondigital.\+net.\+streaming.\+proxy.\+client.\+Client}}}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{interfacecom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1client_1_1Client_1_1DataReceivedListener}{Data\+Received\+Listener}} {\bfseries m\+Data\+Received\+Listener}
\item 
Stream\+Container\+Decoder {\bfseries stream\+Container\+Decoder}
\item 
URI {\bfseries m\+Uri}
\item 
String {\bfseries m\+User\+Agent} = "{}Triton\+Digital Streaming Proxy"{}
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Implementation of a Client that connects to a stream using an HTTP GET that typically never closes. 

\doxysubsection{Member Function Documentation}
\Hypertarget{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1client_1_1http_1_1HttpClient_ac859110299b27be3bcd13d52326a7979}\label{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1client_1_1http_1_1HttpClient_ac859110299b27be3bcd13d52326a7979} 
\index{com.tritondigital.net.streaming.proxy.client.http.HttpClient@{com.tritondigital.net.streaming.proxy.client.http.HttpClient}!DebugLog@{DebugLog}}
\index{DebugLog@{DebugLog}!com.tritondigital.net.streaming.proxy.client.http.HttpClient@{com.tritondigital.net.streaming.proxy.client.http.HttpClient}}
\doxysubsubsection{\texorpdfstring{DebugLog()}{DebugLog()}}
{\footnotesize\ttfamily void com.\+tritondigital.\+net.\+streaming.\+proxy.\+client.\+http.\+Http\+Client.\+Debug\+Log (\begin{DoxyParamCaption}\item[{Http\+URLConnection}]{url\+Connection }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [protected]}}



Prints the content of a response (return code + headers). 

Does not print the content. \Hypertarget{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1client_1_1http_1_1HttpClient_a3b0f6c06ab3e427a093b6db91216db65}\label{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1client_1_1http_1_1HttpClient_a3b0f6c06ab3e427a093b6db91216db65} 
\index{com.tritondigital.net.streaming.proxy.client.http.HttpClient@{com.tritondigital.net.streaming.proxy.client.http.HttpClient}!disconnect@{disconnect}}
\index{disconnect@{disconnect}!com.tritondigital.net.streaming.proxy.client.http.HttpClient@{com.tritondigital.net.streaming.proxy.client.http.HttpClient}}
\doxysubsubsection{\texorpdfstring{disconnect()}{disconnect()}}
{\footnotesize\ttfamily void com.\+tritondigital.\+net.\+streaming.\+proxy.\+client.\+http.\+Http\+Client.\+disconnect (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Reimplemented from \mbox{\hyperlink{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1client_1_1Client_ad6472fbb7bfb82d0ad5c634820d8100b}{com.\+tritondigital.\+net.\+streaming.\+proxy.\+client.\+Client}}.

\Hypertarget{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1client_1_1http_1_1HttpClient_a0db0346beaf5f66a46550bfd3445efd2}\label{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1client_1_1http_1_1HttpClient_a0db0346beaf5f66a46550bfd3445efd2} 
\index{com.tritondigital.net.streaming.proxy.client.http.HttpClient@{com.tritondigital.net.streaming.proxy.client.http.HttpClient}!receiveResponse@{receiveResponse}}
\index{receiveResponse@{receiveResponse}!com.tritondigital.net.streaming.proxy.client.http.HttpClient@{com.tritondigital.net.streaming.proxy.client.http.HttpClient}}
\doxysubsubsection{\texorpdfstring{receiveResponse()}{receiveResponse()}}
{\footnotesize\ttfamily void com.\+tritondigital.\+net.\+streaming.\+proxy.\+client.\+http.\+Http\+Client.\+receive\+Response (\begin{DoxyParamCaption}\item[{Http\+URLConnection}]{url\+Connection }\end{DoxyParamCaption}) throws IOException\hspace{0.3cm}{\ttfamily [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.


\begin{DoxyParams}{Parameters}
{\em url\+Connection} & The connection that received the data. \\
\hline
\end{DoxyParams}
\Hypertarget{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1client_1_1http_1_1HttpClient_a253dbdff477a43f3e89e1aa4f5aa03a4}\label{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1client_1_1http_1_1HttpClient_a253dbdff477a43f3e89e1aa4f5aa03a4} 
\index{com.tritondigital.net.streaming.proxy.client.http.HttpClient@{com.tritondigital.net.streaming.proxy.client.http.HttpClient}!startConnectingInBackground@{startConnectingInBackground}}
\index{startConnectingInBackground@{startConnectingInBackground}!com.tritondigital.net.streaming.proxy.client.http.HttpClient@{com.tritondigital.net.streaming.proxy.client.http.HttpClient}}
\doxysubsubsection{\texorpdfstring{startConnectingInBackground()}{startConnectingInBackground()}}
{\footnotesize\ttfamily void com.\+tritondigital.\+net.\+streaming.\+proxy.\+client.\+http.\+Http\+Client.\+start\+Connecting\+In\+Background (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [protected]}}



Reimplemented from \mbox{\hyperlink{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1client_1_1Client_ae5fa383e3605942863c72139cb198406}{com.\+tritondigital.\+net.\+streaming.\+proxy.\+client.\+Client}}.



The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
sdk/src/main/java/com/tritondigital/net/streaming/proxy/client/http/Http\+Client.\+java\end{DoxyCompactItemize}
