KJavaProcess Class Reference
Inheritance diagram for KJavaProcess:

Signals | |
void | received (const QByteArray &) |
void | exited (int status) |
Public Member Functions | |
KJavaProcess () | |
virtual | ~KJavaProcess () |
bool | startJava () |
void | stopJava () |
bool | isRunning () |
void | setJVMPath (const QString &path) |
void | setClasspath (const QString &classpath) |
void | setSystemProperty (const QString &name, const QString &value) |
void | setMainClass (const QString &clazzName) |
void | setExtraArgs (const QString &args) |
void | setClassArgs (const QString &classArgs) |
void | send (char cmd_code, const QStringList &args) |
void | send (char cmd_code, const QStringList &args, const QByteArray &data) |
void | flushBuffers () |
Protected Slots | |
void | slotWroteData () |
void | slotReceivedData (int, int &) |
void | slotExited (KProcess *process) |
Protected Member Functions | |
virtual bool | invokeJVM () |
virtual void | killJVM () |
QByteArray * | addArgs (char cmd_code, const QStringList &args) |
void | popBuffer () |
void | sendBuffer (QByteArray *buff) |
void | storeSize (QByteArray *buff) |
Protected Attributes | |
KProcess * | javaProcess |
Detailed Description
Definition at line 42 of file kjavaprocess.h.
Constructor & Destructor Documentation
|
Creates a process object, the process is NOT invoked at this point. You should first set the process's parameters, and then call startJava. Definition at line 49 of file kjavaprocess.cpp. References QObject::connect(), javaProcess, KProcess::processExited(), KProcess::receivedStdout(), slotExited(), slotReceivedData(), slotWroteData(), and KProcess::wroteStdin(). |
Member Function Documentation
|
Invoke the JVM with the parameters that have been set. The Java process will start after this call. Definition at line 85 of file kjavaprocess.cpp. References invokeJVM(). Referenced by KJavaAppletServer::KJavaAppletServer(). |
|
Stop the JVM (if it's running).
Definition at line 90 of file kjavaprocess.cpp. References killJVM(). Referenced by ~KJavaProcess(). |
|
Returns the status of the java Process- true if it's ok, false if it has died. It calls KProcess::isRunning() Definition at line 80 of file kjavaprocess.cpp. References KProcess::isRunning(), and javaProcess. Referenced by send(), and ~KJavaProcess(). |
|
Used to specify the path to the Java executable to be run.
Definition at line 95 of file kjavaprocess.cpp. Referenced by KJavaAppletServer::setupJava(). |
|
This will set the classpath the Java process will use. It's used as a the -cp command line option. It adds every jar file stored in $KDEDIRS/share/apps/kjava/ to the classpath, and then adds the $CLASSPATH environmental variable. This allows users to simply drop the JSSE (Java Secure Sockets Extension classes into that directory without having to modify the jvm configuration files. Definition at line 100 of file kjavaprocess.cpp. Referenced by KJavaAppletServer::setupJava(). |
|
Set a property on the java command line as -Dname=value, or -Dname if value is QString::null. For example, you could call setSystemProperty( "kjas.debug", "" ) to set the kjas.debug property. Definition at line 105 of file kjavaprocess.cpp. Referenced by KJavaAppletServer::setupJava(). |
|
The class to be called when startJava() is called.
Definition at line 111 of file kjavaprocess.cpp. Referenced by KJavaAppletServer::setupJava(). |
|
Extra flags passed to the JVM.
Definition at line 116 of file kjavaprocess.cpp. Referenced by KJavaAppletServer::setupJava(). |
|
Arguments passed to the main class. They will be very last in the java command line, after the main class. Definition at line 121 of file kjavaprocess.cpp. |
|
Sends a command to the KJAS Applet Server by building a QByteArray out of the data, and then writes it standard out.
Definition at line 183 of file kjavaprocess.cpp. References addArgs(), endl(), isRunning(), kdDebug(), sendBuffer(), and storeSize(). Referenced by KJavaAppletServer::callMember(), KJavaAppletServer::createApplet(), KJavaAppletServer::createContext(), KJavaAppletServer::derefObject(), KJavaAppletServer::destroyApplet(), KJavaAppletServer::destroyContext(), KJavaAppletServer::getMember(), KJavaAppletServer::initApplet(), KJavaAppletServer::putMember(), KJavaAppletServer::quit(), KJavaAppletServer::sendURLData(), KJavaAppletServer::slotJavaRequest(), KJavaAppletServer::startApplet(), and KJavaAppletServer::stopApplet(). |
|
Sends a command to the KJAS Applet Server by building a QByteArray out of the data, and then writes it standard out. It adds each QString in the arg list, and then adds the data array. Definition at line 194 of file kjavaprocess.cpp. References addArgs(), endl(), isRunning(), kdDebug(), sendBuffer(), and storeSize(). |
|
Writes all pending data to JVM.
Definition at line 327 of file kjavaprocess.cpp. References KProcess::innot, and KProcess::slotSendData(). Referenced by KJavaAppletServer::quit(). |
|
This slot is called whenever something is written to stdin of the process. It's called again to make sure we keep emptying out the buffer that contains the messages we need send. Definition at line 239 of file kjavaprocess.cpp. References endl(), kdDebug(), and popBuffer(). Referenced by KJavaProcess(). |
|
This slot is called when the Java Process writes to standard out. We then process the data from the file descriptor that is passed to us and send the command to the AppletServer Definition at line 340 of file kjavaprocess.cpp. References endl(), kdError(), and QString::toInt(). Referenced by killJVM(), and KJavaProcess(). |
|
This slot is called when the Java Process exited.
Definition at line 385 of file kjavaprocess.cpp. References endl(), KProcess::exitStatus(), javaProcess, kdDebug(), and KProcess::status. Referenced by KJavaProcess(). |
The documentation for this class was generated from the following files: