\doxysection{com.\+tritondigital.\+net.\+streaming.\+proxy.\+server.\+Server Class Reference}
\hypertarget{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1server_1_1Server}{}\label{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1server_1_1Server}\index{com.tritondigital.net.streaming.proxy.server.Server@{com.tritondigital.net.streaming.proxy.server.Server}}
Inheritance diagram for com.\+tritondigital.\+net.\+streaming.\+proxy.\+server.\+Server\+:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=1.573034cm]{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1server_1_1Server}
\end{center}
\end{figure}
\doxysubsubsection*{Classes}
\begin{DoxyCompactItemize}
\item 
enum \mbox{\hyperlink{enumcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1server_1_1Server_1_1State}{State}}
\begin{DoxyCompactList}\small\item\em All different states in which the server can be. \end{DoxyCompactList}\item 
interface \mbox{\hyperlink{interfacecom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1server_1_1Server_1_1StateChangedListener}{State\+Changed\+Listener}}
\begin{DoxyCompactList}\small\item\em Interface to be implemented in order to be notified about the important changes of state of the server. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
void \mbox{\hyperlink{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1server_1_1Server_ae8db3873d9eb41d642b7e1e695e38bfc}{listen}} (int port)
\begin{DoxyCompactList}\small\item\em Starts listening and accepting connections on the given port. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1server_1_1Server_aa7a7241d0ac7c44f2faeade1d2779b9f}{stop}} ()
\begin{DoxyCompactList}\small\item\em Stops the server. \end{DoxyCompactList}\item 
abstract URI \mbox{\hyperlink{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1server_1_1Server_a2b270c42292328ae5289ccc529214812}{get\+Uri}} ()
\begin{DoxyCompactList}\small\item\em Returns the Uri that should be used to connect to this server, typically localhost on the port specified in the call to listen. \end{DoxyCompactList}\item 
boolean \mbox{\hyperlink{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1server_1_1Server_a5d97bdce69a5aa3a79c7393bcf85215f}{block\+Until\+Ready}} ()
\item 
\Hypertarget{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1server_1_1Server_a4a461282f79b6b2225c0d211fcc33f53}\label{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1server_1_1Server_a4a461282f79b6b2225c0d211fcc33f53} 
void {\bfseries stop\+Blocking\+Until\+Ready} ()
\begin{DoxyCompactList}\small\item\em Unblock the thread waiting on a call to block\+Until\+Ready. \end{DoxyCompactList}\item 
abstract void \mbox{\hyperlink{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1server_1_1Server_a197ffbd6fcd89d42d9f35488cc5b91b2}{set\+Data\+Provider}} (Data\+Provider rtp\+Packet\+Provider)
\begin{DoxyCompactList}\small\item\em Sets the instance that provides the data to stream to the server. \end{DoxyCompactList}\item 
\Hypertarget{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1server_1_1Server_a320d047ca4cb4e51f0c7ec9c9342e60c}\label{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1server_1_1Server_a320d047ca4cb4e51f0c7ec9c9342e60c} 
void {\bfseries set\+State\+Changed\+Listener} (\mbox{\hyperlink{interfacecom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1server_1_1Server_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 server. \end{DoxyCompactList}\item 
\Hypertarget{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1server_1_1Server_a8ca96e96058c2ee374c9d01191778688}\label{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1server_1_1Server_a8ca96e96058c2ee374c9d01191778688} 
\mbox{\hyperlink{enumcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1server_1_1Server_1_1State}{State}} {\bfseries get\+State} ()
\begin{DoxyCompactList}\small\item\em Gets the current state of the server. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Public Attributes}
\begin{DoxyCompactItemize}
\item 
\Hypertarget{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1server_1_1Server_a3f92df7f0f6b9bb908983d51bfd6f5c0}\label{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1server_1_1Server_a3f92df7f0f6b9bb908983d51bfd6f5c0} 
final String {\bfseries TAG} = "{}Server"{}
\end{DoxyCompactItemize}
\doxysubsubsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
\Hypertarget{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1server_1_1Server_ace2fc1d27ef8854d9c87d099201fd612}\label{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1server_1_1Server_ace2fc1d27ef8854d9c87d099201fd612} 
abstract void {\bfseries bind\+And\+Listen} (int port)
\begin{DoxyCompactList}\small\item\em Does the job of binding a socket and start accepting incoming connections. \end{DoxyCompactList}\item 
abstract void \mbox{\hyperlink{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1server_1_1Server_ae11a46d44d621fdf7aa356c0fa0d6ff9}{on\+Process\+Message}} (Object user\+Info)
\begin{DoxyCompactList}\small\item\em Let the child class do whatever it needs with the message. \end{DoxyCompactList}\item 
\Hypertarget{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1server_1_1Server_ac579f5c27926d9d59df1f3ee29a629b5}\label{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1server_1_1Server_ac579f5c27926d9d59df1f3ee29a629b5} 
abstract void {\bfseries disconnect\+And\+Unbind} ()
\begin{DoxyCompactList}\small\item\em Does the job of disconnecting, unbinding the socket and stop accepting incoming connections. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1server_1_1Server_a885045fad07e6c0720f915a4ebaa24b4}{on\+Connected}} ()
\begin{DoxyCompactList}\small\item\em Called when the child class accepts a connection. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1server_1_1Server_a8ab3706180ba9430b836221ee03a2efa}{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_1server_1_1Server_a563494b875cba3c8cec7da487227db0e}{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_1server_1_1Server_a8dfcd48c3da623f89c41b3da190685b8}{on\+Message\+Received}} (Object user\+Info)
\begin{DoxyCompactList}\small\item\em Called when the child class receives data. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1server_1_1Server_a0e9cba38c009f83f1e1112d3e157f49f}{set\+State\+Not\+Ready}} ()
\begin{DoxyCompactList}\small\item\em Sets the internal state to not ready state and notify listener about it. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1server_1_1Server_ad4566ec1b00a1bde8a343bc71e723dd4}{set\+State\+Ready}} ()
\begin{DoxyCompactList}\small\item\em Sets the internal state to ready state and notify listener about it. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1server_1_1Server_a4f705f88274c5619a98bd56eb1fcd701}{set\+State\+Listening}} ()
\begin{DoxyCompactList}\small\item\em Sets the internal state to listening state and notify listener about it. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1server_1_1Server_a6435d16c082d6518f11473720e2eb44f}{set\+State\+Connected}} ()
\begin{DoxyCompactList}\small\item\em Sets the internal state to connected state and notify listener about it. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1server_1_1Server_ab156a0ada638e89f94d35f457ba1a252}{set\+State\+Stopping}} ()
\begin{DoxyCompactList}\small\item\em Sets the internal state to stopping state and notify listener about it. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1server_1_1Server_a272fe8f787f6f7e50551245c26b2cb55}{set\+State\+Error}} (Error\+Detail error\+Detail)
\begin{DoxyCompactList}\small\item\em Sets the internal state to error state and notify listener about it. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Static Protected Attributes}
\begin{DoxyCompactItemize}
\item 
\Hypertarget{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1server_1_1Server_a768f4672b68db29b726c833055fe4f61}\label{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1server_1_1Server_a768f4672b68db29b726c833055fe4f61} 
static final String {\bfseries LOCALHOST} = "{}127.\+0.\+0.\+1"{}
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Base class for any network server allowing sending a stream. Any child of this class should provide functionality to take packets from a source (provider) and send it to the client.

Typically, child classes will call on\+Connected, on\+Disconnected, on\+Message\+Received and on\+Error when those events are received. The superclass will synchronise the calls, ensure that the states are consistent and call the on\+Complete\+Connection, on\+Complete\+Disconnection, on\+Process\+Request and on\+Process\+Error methods on the child class.

If they choose to manipulate the state directly, child classes should make sure to match the desired behaviour, especially setting the READY state when the server is ready to listen, as this will unblock any thread that called block\+Until\+Ready. 

\doxysubsection{Member Function Documentation}
\Hypertarget{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1server_1_1Server_a5d97bdce69a5aa3a79c7393bcf85215f}\label{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1server_1_1Server_a5d97bdce69a5aa3a79c7393bcf85215f} 
\index{com.tritondigital.net.streaming.proxy.server.Server@{com.tritondigital.net.streaming.proxy.server.Server}!blockUntilReady@{blockUntilReady}}
\index{blockUntilReady@{blockUntilReady}!com.tritondigital.net.streaming.proxy.server.Server@{com.tritondigital.net.streaming.proxy.server.Server}}
\doxysubsubsection{\texorpdfstring{blockUntilReady()}{blockUntilReady()}}
{\footnotesize\ttfamily boolean com.\+tritondigital.\+net.\+streaming.\+proxy.\+server.\+Server.\+block\+Until\+Ready (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}

Some servers might require a certain amount of data to be already available (either to fill a buffer or to extract configuration information needed in the stream negotiation) before being ready to listen. This method blocks the calling thread until the server has all required information and is ready to start listening.

This is typically between the data provider and the call to {\ttfamily listen}. There is also a notification sent when the server becomes ready, to avoid blocking the thread and allow it to do some UI animation while waiting. If the server is not ready, it may block when generating a response, causing the client to consider it as a timeout and disconnect.

This method blocks until either the server is ready, the server is stopped / encountered an error or until stop\+Blocking\+Until\+Ready is invoked. The return code will differ if the server is unlocked and the server is not ready.

\begin{DoxyReturn}{Returns}
{\ttfamily true} If the server is ready, {\ttfamily false} if not (there was an error or the server was stopped). 
\end{DoxyReturn}
\Hypertarget{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1server_1_1Server_a2b270c42292328ae5289ccc529214812}\label{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1server_1_1Server_a2b270c42292328ae5289ccc529214812} 
\index{com.tritondigital.net.streaming.proxy.server.Server@{com.tritondigital.net.streaming.proxy.server.Server}!getUri@{getUri}}
\index{getUri@{getUri}!com.tritondigital.net.streaming.proxy.server.Server@{com.tritondigital.net.streaming.proxy.server.Server}}
\doxysubsubsection{\texorpdfstring{getUri()}{getUri()}}
{\footnotesize\ttfamily abstract URI com.\+tritondigital.\+net.\+streaming.\+proxy.\+server.\+Server.\+get\+Uri (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [abstract]}}



Returns the Uri that should be used to connect to this server, typically localhost on the port specified in the call to listen. 

Returns null if the server is not listening. \Hypertarget{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1server_1_1Server_ae8db3873d9eb41d642b7e1e695e38bfc}\label{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1server_1_1Server_ae8db3873d9eb41d642b7e1e695e38bfc} 
\index{com.tritondigital.net.streaming.proxy.server.Server@{com.tritondigital.net.streaming.proxy.server.Server}!listen@{listen}}
\index{listen@{listen}!com.tritondigital.net.streaming.proxy.server.Server@{com.tritondigital.net.streaming.proxy.server.Server}}
\doxysubsubsection{\texorpdfstring{listen()}{listen()}}
{\footnotesize\ttfamily void com.\+tritondigital.\+net.\+streaming.\+proxy.\+server.\+Server.\+listen (\begin{DoxyParamCaption}\item[{int}]{port }\end{DoxyParamCaption})}



Starts listening and accepting connections on the given port. 


\begin{DoxyParams}{Parameters}
{\em port} & The port to listen on, -\/1 for any available port. When using any available port, make sure to use get\+Uri in order to know the address of the server. If the port is specified (not -\/1), and is not available for bind, the server enters the error state. \\
\hline
\end{DoxyParams}
\Hypertarget{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1server_1_1Server_a885045fad07e6c0720f915a4ebaa24b4}\label{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1server_1_1Server_a885045fad07e6c0720f915a4ebaa24b4} 
\index{com.tritondigital.net.streaming.proxy.server.Server@{com.tritondigital.net.streaming.proxy.server.Server}!onConnected@{onConnected}}
\index{onConnected@{onConnected}!com.tritondigital.net.streaming.proxy.server.Server@{com.tritondigital.net.streaming.proxy.server.Server}}
\doxysubsubsection{\texorpdfstring{onConnected()}{onConnected()}}
{\footnotesize\ttfamily void com.\+tritondigital.\+net.\+streaming.\+proxy.\+server.\+Server.\+on\+Connected (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [protected]}}



Called when the child class accepts a connection. 

When it is safe (thread synchronisation), the internal state is changed. \Hypertarget{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1server_1_1Server_a8ab3706180ba9430b836221ee03a2efa}\label{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1server_1_1Server_a8ab3706180ba9430b836221ee03a2efa} 
\index{com.tritondigital.net.streaming.proxy.server.Server@{com.tritondigital.net.streaming.proxy.server.Server}!onDisconnected@{onDisconnected}}
\index{onDisconnected@{onDisconnected}!com.tritondigital.net.streaming.proxy.server.Server@{com.tritondigital.net.streaming.proxy.server.Server}}
\doxysubsubsection{\texorpdfstring{onDisconnected()}{onDisconnected()}}
{\footnotesize\ttfamily void com.\+tritondigital.\+net.\+streaming.\+proxy.\+server.\+Server.\+on\+Disconnected (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [protected]}}



Called when the child class disconnected. 

When it is safe (thread synchronisation), the internal state is changed. \Hypertarget{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1server_1_1Server_a563494b875cba3c8cec7da487227db0e}\label{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1server_1_1Server_a563494b875cba3c8cec7da487227db0e} 
\index{com.tritondigital.net.streaming.proxy.server.Server@{com.tritondigital.net.streaming.proxy.server.Server}!onError@{onError}}
\index{onError@{onError}!com.tritondigital.net.streaming.proxy.server.Server@{com.tritondigital.net.streaming.proxy.server.Server}}
\doxysubsubsection{\texorpdfstring{onError()}{onError()}}
{\footnotesize\ttfamily void com.\+tritondigital.\+net.\+streaming.\+proxy.\+server.\+Server.\+on\+Error (\begin{DoxyParamCaption}\item[{Error\+Detail}]{error\+Detail }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [protected]}}



Called when the child class encounters an error. 

When it is safe (thread synchronisation), the internal state is changed. \Hypertarget{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1server_1_1Server_a8dfcd48c3da623f89c41b3da190685b8}\label{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1server_1_1Server_a8dfcd48c3da623f89c41b3da190685b8} 
\index{com.tritondigital.net.streaming.proxy.server.Server@{com.tritondigital.net.streaming.proxy.server.Server}!onMessageReceived@{onMessageReceived}}
\index{onMessageReceived@{onMessageReceived}!com.tritondigital.net.streaming.proxy.server.Server@{com.tritondigital.net.streaming.proxy.server.Server}}
\doxysubsubsection{\texorpdfstring{onMessageReceived()}{onMessageReceived()}}
{\footnotesize\ttfamily void com.\+tritondigital.\+net.\+streaming.\+proxy.\+server.\+Server.\+on\+Message\+Received (\begin{DoxyParamCaption}\item[{Object}]{user\+Info }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [protected]}}



Called when the child class receives data. 

When it is safe (thread synchronisation), the child is notified via on\+Process\+Message and receives the user info that it passed. \Hypertarget{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1server_1_1Server_ae11a46d44d621fdf7aa356c0fa0d6ff9}\label{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1server_1_1Server_ae11a46d44d621fdf7aa356c0fa0d6ff9} 
\index{com.tritondigital.net.streaming.proxy.server.Server@{com.tritondigital.net.streaming.proxy.server.Server}!onProcessMessage@{onProcessMessage}}
\index{onProcessMessage@{onProcessMessage}!com.tritondigital.net.streaming.proxy.server.Server@{com.tritondigital.net.streaming.proxy.server.Server}}
\doxysubsubsection{\texorpdfstring{onProcessMessage()}{onProcessMessage()}}
{\footnotesize\ttfamily abstract void com.\+tritondigital.\+net.\+streaming.\+proxy.\+server.\+Server.\+on\+Process\+Message (\begin{DoxyParamCaption}\item[{Object}]{user\+Info }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [abstract]}, {\ttfamily [protected]}}



Let the child class do whatever it needs with the message. 

Only called if the server is in the correct state, and protected for thread safety. \Hypertarget{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1server_1_1Server_a197ffbd6fcd89d42d9f35488cc5b91b2}\label{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1server_1_1Server_a197ffbd6fcd89d42d9f35488cc5b91b2} 
\index{com.tritondigital.net.streaming.proxy.server.Server@{com.tritondigital.net.streaming.proxy.server.Server}!setDataProvider@{setDataProvider}}
\index{setDataProvider@{setDataProvider}!com.tritondigital.net.streaming.proxy.server.Server@{com.tritondigital.net.streaming.proxy.server.Server}}
\doxysubsubsection{\texorpdfstring{setDataProvider()}{setDataProvider()}}
{\footnotesize\ttfamily abstract void com.\+tritondigital.\+net.\+streaming.\+proxy.\+server.\+Server.\+set\+Data\+Provider (\begin{DoxyParamCaption}\item[{Data\+Provider}]{rtp\+Packet\+Provider }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [abstract]}}



Sets the instance that provides the data to stream to the server. 

Ignored if the server is already listening or connected.

The servers often require a specific class of providers, make sure to read the specific server documentation for this method. 

Reimplemented in \mbox{\hyperlink{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1server_1_1http_1_1HttpServer_a5207840b582b7c4cc9fc3668b43766b5}{com.\+tritondigital.\+net.\+streaming.\+proxy.\+server.\+http.\+Http\+Server}}, and \mbox{\hyperlink{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1server_1_1rtsp_1_1RtspServer_ad079a99fb70e867a30f3bcdff83eae72}{com.\+tritondigital.\+net.\+streaming.\+proxy.\+server.\+rtsp.\+Rtsp\+Server}}.

\Hypertarget{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1server_1_1Server_a6435d16c082d6518f11473720e2eb44f}\label{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1server_1_1Server_a6435d16c082d6518f11473720e2eb44f} 
\index{com.tritondigital.net.streaming.proxy.server.Server@{com.tritondigital.net.streaming.proxy.server.Server}!setStateConnected@{setStateConnected}}
\index{setStateConnected@{setStateConnected}!com.tritondigital.net.streaming.proxy.server.Server@{com.tritondigital.net.streaming.proxy.server.Server}}
\doxysubsubsection{\texorpdfstring{setStateConnected()}{setStateConnected()}}
{\footnotesize\ttfamily void com.\+tritondigital.\+net.\+streaming.\+proxy.\+server.\+Server.\+set\+State\+Connected (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [protected]}}



Sets the internal state to connected state and notify listener about it. 

Called by subclasses when they accept an incoming connection. \Hypertarget{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1server_1_1Server_a272fe8f787f6f7e50551245c26b2cb55}\label{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1server_1_1Server_a272fe8f787f6f7e50551245c26b2cb55} 
\index{com.tritondigital.net.streaming.proxy.server.Server@{com.tritondigital.net.streaming.proxy.server.Server}!setStateError@{setStateError}}
\index{setStateError@{setStateError}!com.tritondigital.net.streaming.proxy.server.Server@{com.tritondigital.net.streaming.proxy.server.Server}}
\doxysubsubsection{\texorpdfstring{setStateError()}{setStateError()}}
{\footnotesize\ttfamily void com.\+tritondigital.\+net.\+streaming.\+proxy.\+server.\+Server.\+set\+State\+Error (\begin{DoxyParamCaption}\item[{Error\+Detail}]{error\+Detail }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [protected]}}



Sets the internal state to error state and notify listener about it. 

Called by subclasses when they encounter an unrecoverable error. \Hypertarget{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1server_1_1Server_a4f705f88274c5619a98bd56eb1fcd701}\label{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1server_1_1Server_a4f705f88274c5619a98bd56eb1fcd701} 
\index{com.tritondigital.net.streaming.proxy.server.Server@{com.tritondigital.net.streaming.proxy.server.Server}!setStateListening@{setStateListening}}
\index{setStateListening@{setStateListening}!com.tritondigital.net.streaming.proxy.server.Server@{com.tritondigital.net.streaming.proxy.server.Server}}
\doxysubsubsection{\texorpdfstring{setStateListening()}{setStateListening()}}
{\footnotesize\ttfamily void com.\+tritondigital.\+net.\+streaming.\+proxy.\+server.\+Server.\+set\+State\+Listening (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [protected]}}



Sets the internal state to listening state and notify listener about it. 

Called by subclasses when they start listening. \Hypertarget{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1server_1_1Server_a0e9cba38c009f83f1e1112d3e157f49f}\label{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1server_1_1Server_a0e9cba38c009f83f1e1112d3e157f49f} 
\index{com.tritondigital.net.streaming.proxy.server.Server@{com.tritondigital.net.streaming.proxy.server.Server}!setStateNotReady@{setStateNotReady}}
\index{setStateNotReady@{setStateNotReady}!com.tritondigital.net.streaming.proxy.server.Server@{com.tritondigital.net.streaming.proxy.server.Server}}
\doxysubsubsection{\texorpdfstring{setStateNotReady()}{setStateNotReady()}}
{\footnotesize\ttfamily void com.\+tritondigital.\+net.\+streaming.\+proxy.\+server.\+Server.\+set\+State\+Not\+Ready (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [protected]}}



Sets the internal state to not ready state and notify listener about it. 

Called by subclasses when the Data\+Provider changes and is not ready to be used for streaming. \Hypertarget{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1server_1_1Server_ad4566ec1b00a1bde8a343bc71e723dd4}\label{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1server_1_1Server_ad4566ec1b00a1bde8a343bc71e723dd4} 
\index{com.tritondigital.net.streaming.proxy.server.Server@{com.tritondigital.net.streaming.proxy.server.Server}!setStateReady@{setStateReady}}
\index{setStateReady@{setStateReady}!com.tritondigital.net.streaming.proxy.server.Server@{com.tritondigital.net.streaming.proxy.server.Server}}
\doxysubsubsection{\texorpdfstring{setStateReady()}{setStateReady()}}
{\footnotesize\ttfamily void com.\+tritondigital.\+net.\+streaming.\+proxy.\+server.\+Server.\+set\+State\+Ready (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [protected]}}



Sets the internal state to ready state and notify listener about it. 

Called by subclasses when they are ready to listen (all needed data have been received from the provider). \Hypertarget{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1server_1_1Server_ab156a0ada638e89f94d35f457ba1a252}\label{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1server_1_1Server_ab156a0ada638e89f94d35f457ba1a252} 
\index{com.tritondigital.net.streaming.proxy.server.Server@{com.tritondigital.net.streaming.proxy.server.Server}!setStateStopping@{setStateStopping}}
\index{setStateStopping@{setStateStopping}!com.tritondigital.net.streaming.proxy.server.Server@{com.tritondigital.net.streaming.proxy.server.Server}}
\doxysubsubsection{\texorpdfstring{setStateStopping()}{setStateStopping()}}
{\footnotesize\ttfamily void com.\+tritondigital.\+net.\+streaming.\+proxy.\+server.\+Server.\+set\+State\+Stopping (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [protected]}}



Sets the internal state to stopping state and notify listener about it. 

Called by subclasses when they start to stop. Stays in this state until the stop is complete. \Hypertarget{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1server_1_1Server_aa7a7241d0ac7c44f2faeade1d2779b9f}\label{classcom_1_1tritondigital_1_1net_1_1streaming_1_1proxy_1_1server_1_1Server_aa7a7241d0ac7c44f2faeade1d2779b9f} 
\index{com.tritondigital.net.streaming.proxy.server.Server@{com.tritondigital.net.streaming.proxy.server.Server}!stop@{stop}}
\index{stop@{stop}!com.tritondigital.net.streaming.proxy.server.Server@{com.tritondigital.net.streaming.proxy.server.Server}}
\doxysubsubsection{\texorpdfstring{stop()}{stop()}}
{\footnotesize\ttfamily void com.\+tritondigital.\+net.\+streaming.\+proxy.\+server.\+Server.\+stop (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Stops the server. 

Stops listening and disconnects the connected client if there is one. The server loses the ready state of its data provider when disconnected. It therefore has to wait for its Data Provider to send the ready notification before it can be used to listen again. 

The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
streamingproxy/src/main/java/com/tritondigital/net/streaming/proxy/server/Server.\+java\end{DoxyCompactItemize}
