kjavaprocess.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef KJAVAPROCESS_H
00025 #define KJAVAPROCESS_H
00026
00027 #include <kprocess.h>
00028 #include <qcstring.h>
00029
00041 class KJavaProcessPrivate;
00042 class KJavaProcess : public KProcess
00043 {
00044 Q_OBJECT
00045
00046 public:
00051 KJavaProcess();
00052 virtual ~KJavaProcess();
00053
00058 bool startJava();
00059
00063 void stopJava();
00064
00069 bool isRunning();
00070
00074 void setJVMPath( const QString& path );
00075
00083 void setClasspath( const QString& classpath );
00084
00089 void setSystemProperty( const QString& name, const QString& value );
00090
00094 void setMainClass( const QString& clazzName );
00095
00099 void setExtraArgs( const QString& args );
00100
00105 void setClassArgs( const QString& classArgs );
00106
00111 void send( char cmd_code, const QStringList& args );
00115 void sendSync( char cmd_code, const QStringList& args );
00119 void syncCommandReceived();
00125 void send( char cmd_code, const QStringList& args, const QByteArray& data );
00126
00127 protected slots:
00133 void slotWroteData();
00134
00140 void slotReceivedData( int, int& );
00144 void slotExited( KProcess *process );
00145
00146 protected:
00147 virtual bool invokeJVM();
00148 virtual void killJVM();
00149
00150 QByteArray* addArgs( char cmd_code, const QStringList& args );
00151 void popBuffer();
00152 void sendBuffer( QByteArray* buff );
00153 void storeSize( QByteArray* buff );
00154
00155 KProcess* javaProcess;
00156
00157 signals:
00158 void received( const QByteArray& );
00159 void exited( int status );
00160
00161 private:
00162 KJavaProcessPrivate *d;
00163
00164 };
00165
00166 #endif // KJAVAPROCESS_H
This file is part of the documentation for kdelibs Version 3.1.0.