\section{KJava\-Applet\-Server Class Reference}
\label{classKJavaAppletServer}\index{KJavaAppletServer@{KJavaAppletServer}}
Communicates with a KJAS server to display and control Java applets.  


{\tt \#include $<$kjavaappletserver.h$>$}

Inheritance diagram for KJava\-Applet\-Server:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=69pt]{classKJavaAppletServer__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KJava\-Applet\-Server:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=166pt]{classKJavaAppletServer__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KJava\-Applet\-Server} ()
\item 
void {\bf create\-Context} (int context\-Id, {\bf KJava\-Applet\-Context} $\ast$context)
\item 
void {\bf destroy\-Context} (int context\-Id)
\item 
bool {\bf create\-Applet} (int context\-Id, int applet\-Id, const {\bf QString} \&{\bf name}, const {\bf QString} \&clazz\-Name, const {\bf QString} \&base\-URL, const {\bf QString} \&user, const {\bf QString} \&password, const {\bf QString} \&authname, const {\bf QString} \&code\-Base, const {\bf QString} \&jar\-File, {\bf QSize} size, const {\bf QMap}$<$ {\bf QString}, {\bf QString} $>$ \&params, const {\bf QString} \&window\-Title)
\item 
void {\bf init\-Applet} (int context\-Id, int applet\-Id)
\item 
void {\bf destroy\-Applet} (int context\-Id, int applet\-Id)
\item 
void {\bf start\-Applet} (int context\-Id, int applet\-Id)
\item 
void {\bf stop\-Applet} (int context\-Id, int applet\-Id)
\item 
void {\bf send\-URLData} (int loader\-ID, int code, const {\bf QByte\-Array} \&data)
\item 
void {\bf remove\-Data\-Job} (int loader\-ID)
\item 
void {\bf quit} ()
\item 
{\bf KJava\-Process} $\ast$ {\bf java\-Process} ()\label{classKJavaAppletServer_a12}

\item 
{\bf QString} {\bf applet\-Label} ()\label{classKJavaAppletServer_a13}

\item 
void {\bf wait\-For\-Return\-Data} (JSStack\-Frame $\ast$)\label{classKJavaAppletServer_a14}

\item 
void {\bf end\-Wait\-For\-Return\-Data} ()\label{classKJavaAppletServer_a15}

\item 
bool {\bf get\-Member} ({\bf QString\-List} \&args, {\bf QString\-List} \&ret\_\-args)\label{classKJavaAppletServer_a16}

\item 
bool {\bf put\-Member} ({\bf QString\-List} \&args)\label{classKJavaAppletServer_a17}

\item 
bool {\bf call\-Member} ({\bf QString\-List} \&args, {\bf QString\-List} \&ret\_\-args)\label{classKJavaAppletServer_a18}

\item 
void {\bf deref\-Object} ({\bf QString\-List} \&args)\label{classKJavaAppletServer_a19}

\item 
bool {\bf using\-KIO} ()\label{classKJavaAppletServer_a20}

\end{CompactItemize}
\subsection*{Static Public Member Functions}
\begin{CompactItemize}
\item 
static {\bf KJava\-Applet\-Server} $\ast$ {\bf allocate\-Java\-Server} ()
\item 
static void {\bf free\-Java\-Server} ()
\item 
static {\bf QString} {\bf get\-Applet\-Label} ()
\end{CompactItemize}
\subsection*{Protected Slots}
\begin{CompactItemize}
\item 
void {\bf slot\-Java\-Request} (const {\bf QByte\-Array} \&qb)\label{classKJavaAppletServer_j0}

\item 
void {\bf check\-Shutdown} ()\label{classKJavaAppletServer_j1}

\item 
void {\bf timer\-Event} ({\bf QTimer\-Event} $\ast$)\label{classKJavaAppletServer_j2}

\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
void {\bf setup\-Java} ({\bf KJava\-Process} $\ast$p)\label{classKJavaAppletServer_b0}

\end{CompactItemize}
\subsection*{Protected Attributes}
\begin{CompactItemize}
\item 
{\bf KJava\-Process} $\ast$ {\bf process}\label{classKJavaAppletServer_p0}

\end{CompactItemize}


\subsection{Detailed Description}
Communicates with a KJAS server to display and control Java applets. 

\begin{Desc}
\item[Author:]Richard J. Moore, {\tt rich@kde.org} \end{Desc}




Definition at line 42 of file kjavaappletserver.h.

\subsection{Constructor \& Destructor Documentation}
\index{KJavaAppletServer@{KJava\-Applet\-Server}!KJavaAppletServer@{KJavaAppletServer}}
\index{KJavaAppletServer@{KJavaAppletServer}!KJavaAppletServer@{KJava\-Applet\-Server}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KJava\-Applet\-Server::KJava\-Applet\-Server ()}\label{classKJavaAppletServer_a0}


Create the applet server. 

These shouldn't be used directly, use allocate\-Java\-Server instead 

Definition at line 133 of file kjavaappletserver.cpp.

References QObject::connect(), and KJava\-Process::start\-Java().

Referenced by allocate\-Java\-Server().

\subsection{Member Function Documentation}
\index{KJavaAppletServer@{KJava\-Applet\-Server}!allocateJavaServer@{allocateJavaServer}}
\index{allocateJavaServer@{allocateJavaServer}!KJavaAppletServer@{KJava\-Applet\-Server}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KJava\-Applet\-Server} $\ast$ KJava\-Applet\-Server::allocate\-Java\-Server ()\hspace{0.3cm}{\tt  [static]}}\label{classKJavaAppletServer_e0}


A factory method that returns the default server. 

This is the way this class is usually instantiated. 

Definition at line 174 of file kjavaappletserver.cpp.

References d, and KJava\-Applet\-Server().\index{KJavaAppletServer@{KJava\-Applet\-Server}!freeJavaServer@{freeJavaServer}}
\index{freeJavaServer@{freeJavaServer}!KJavaAppletServer@{KJava\-Applet\-Server}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KJava\-Applet\-Server::free\-Java\-Server ()\hspace{0.3cm}{\tt  [static]}}\label{classKJavaAppletServer_e1}


When you are done using your reference to the Applet\-Server, you must dereference it by calling {\bf free\-Java\-Server()}{\rm (p.\,\pageref{classKJavaAppletServer_e1})}. 



Definition at line 186 of file kjavaappletserver.cpp.

References KConfig\-Base::read\-Bool\-Entry(), KConfig\-Base::read\-Num\-Entry(), KConfig\-Base::set\-Group(), and QTimer::single\-Shot().\index{KJavaAppletServer@{KJava\-Applet\-Server}!getAppletLabel@{getAppletLabel}}
\index{getAppletLabel@{getAppletLabel}!KJavaAppletServer@{KJava\-Applet\-Server}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KJava\-Applet\-Server::get\-Applet\-Label ()\hspace{0.3cm}{\tt  [static]}}\label{classKJavaAppletServer_e2}


This allows the {\bf KJava\-Applet\-Widget}{\rm (p.\,\pageref{classKJavaAppletWidget})} to display some feedback in a {\bf QLabel} while the applet is being loaded. 

If the java process could not be started, an error message is displayed instead. 

Definition at line 161 of file kjavaappletserver.cpp.\index{KJavaAppletServer@{KJava\-Applet\-Server}!createContext@{createContext}}
\index{createContext@{createContext}!KJavaAppletServer@{KJava\-Applet\-Server}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KJava\-Applet\-Server::create\-Context (int {\em context\-Id}, {\bf KJava\-Applet\-Context} $\ast$ {\em context})}\label{classKJavaAppletServer_a2}


Create an applet context with the specified id. 



Definition at line 317 of file kjavaappletserver.cpp.

References KJava\-Process::send().\index{KJavaAppletServer@{KJava\-Applet\-Server}!destroyContext@{destroyContext}}
\index{destroyContext@{destroyContext}!KJavaAppletServer@{KJava\-Applet\-Server}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KJava\-Applet\-Server::destroy\-Context (int {\em context\-Id})}\label{classKJavaAppletServer_a3}


Destroy the applet context with the specified id. 

All the applets in the context will be destroyed as well. 

Definition at line 329 of file kjavaappletserver.cpp.

References KJava\-Process::send().\index{KJavaAppletServer@{KJava\-Applet\-Server}!createApplet@{createApplet}}
\index{createApplet@{createApplet}!KJavaAppletServer@{KJava\-Applet\-Server}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KJava\-Applet\-Server::create\-Applet (int {\em context\-Id}, int {\em applet\-Id}, const {\bf QString} \& {\em name}, const {\bf QString} \& {\em clazz\-Name}, const {\bf QString} \& {\em base\-URL}, const {\bf QString} \& {\em user}, const {\bf QString} \& {\em password}, const {\bf QString} \& {\em authname}, const {\bf QString} \& {\em code\-Base}, const {\bf QString} \& {\em jar\-File}, {\bf QSize} {\em size}, const {\bf QMap}$<$ {\bf QString}, {\bf QString} $>$ \& {\em params}, const {\bf QString} \& {\em window\-Title})}\label{classKJavaAppletServer_a4}


Create an applet in the specified context with the specified id. 

The applet name, class etc. are specified in the same way as in the HTML APPLET tag. 

Definition at line 340 of file kjavaappletserver.cpp.

References QSize::height(), KJava\-Process::send(), and QSize::width().

Referenced by KJava\-Applet\-Context::create().\index{KJavaAppletServer@{KJava\-Applet\-Server}!initApplet@{initApplet}}
\index{initApplet@{initApplet}!KJavaAppletServer@{KJava\-Applet\-Server}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KJava\-Applet\-Server::init\-Applet (int {\em context\-Id}, int {\em applet\-Id})}\label{classKJavaAppletServer_a5}


This should be called by the {\bf KJava\-Applet\-Widget}{\rm (p.\,\pageref{classKJavaAppletWidget})}. 



Definition at line 398 of file kjavaappletserver.cpp.

References KJava\-Process::send().

Referenced by KJava\-Applet\-Context::init().\index{KJavaAppletServer@{KJava\-Applet\-Server}!destroyApplet@{destroyApplet}}
\index{destroyApplet@{destroyApplet}!KJavaAppletServer@{KJava\-Applet\-Server}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KJava\-Applet\-Server::destroy\-Applet (int {\em context\-Id}, int {\em applet\-Id})}\label{classKJavaAppletServer_a6}


Destroy an applet in the specified context with the specified id. 



Definition at line 408 of file kjavaappletserver.cpp.

References KJava\-Process::send().

Referenced by KJava\-Applet\-Context::destroy().\index{KJavaAppletServer@{KJava\-Applet\-Server}!startApplet@{startApplet}}
\index{startApplet@{startApplet}!KJavaAppletServer@{KJava\-Applet\-Server}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KJava\-Applet\-Server::start\-Applet (int {\em context\-Id}, int {\em applet\-Id})}\label{classKJavaAppletServer_a7}


Start the specified applet. 



Definition at line 418 of file kjavaappletserver.cpp.

References KJava\-Process::send().

Referenced by KJava\-Applet\-Context::start().\index{KJavaAppletServer@{KJava\-Applet\-Server}!stopApplet@{stopApplet}}
\index{stopApplet@{stopApplet}!KJavaAppletServer@{KJava\-Applet\-Server}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KJava\-Applet\-Server::stop\-Applet (int {\em context\-Id}, int {\em applet\-Id})}\label{classKJavaAppletServer_a8}


Stop the specified applet. 



Definition at line 428 of file kjavaappletserver.cpp.

References KJava\-Process::send().

Referenced by KJava\-Applet\-Context::stop().\index{KJavaAppletServer@{KJava\-Applet\-Server}!sendURLData@{sendURLData}}
\index{sendURLData@{sendURLData}!KJavaAppletServer@{KJava\-Applet\-Server}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KJava\-Applet\-Server::send\-URLData (int {\em loader\-ID}, int {\em code}, const {\bf QByte\-Array} \& {\em data})}\label{classKJavaAppletServer_a9}


Send data we got back from a KJava\-Downloader back to the appropriate class loader. 



Definition at line 438 of file kjavaappletserver.cpp.

References KJava\-Process::send().\index{KJavaAppletServer@{KJava\-Applet\-Server}!removeDataJob@{removeDataJob}}
\index{removeDataJob@{removeDataJob}!KJavaAppletServer@{KJava\-Applet\-Server}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KJava\-Applet\-Server::remove\-Data\-Job (int {\em loader\-ID})}\label{classKJavaAppletServer_a10}


Removes KJava\-Downloader from the list (deletes it too). 



Definition at line 447 of file kjavaappletserver.cpp.

References QObject::delete\-Later().\index{KJavaAppletServer@{KJava\-Applet\-Server}!quit@{quit}}
\index{quit@{quit}!KJavaAppletServer@{KJava\-Applet\-Server}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KJava\-Applet\-Server::quit ()}\label{classKJavaAppletServer_a11}


Shut down the KJAS server. 



Definition at line 456 of file kjavaappletserver.cpp.

References KJava\-Process::flush\-Buffers(), KJava\-Process::send(), and KProcess::wait().

The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
kjavaappletserver.h\item 
kjavaappletserver.cpp\end{CompactItemize}
