res
Class JvmMonitor
java.lang.Object
|
+--res.JvmMonitor
- public class JvmMonitor
- extends java.lang.Object
Un oggetto JvmMonitor implementa un monitor per la JVM che usa le
caratteristiche di JVMPI. Mediante i metodi di tale oggetto č
possibile recuperare lo stato dei thread attivi.
- Author:
- Luca Armani outoftime@libero.it
- See Also:
ProcessMonitor
Method Summary |
ThreadStat[] |
getThreadStat()
Ritorna le statistiche di tutti i thread attivi. |
int |
getVersion()
Ritorna la versione della classe JvmManager. |
static void |
run(java.lang.String clazz,
java.lang.String[] args)
Carica una classe esterna. |
java.lang.String |
toString()
Ritorna la rappresentazione di questo oggetto. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
JvmMonitor
public JvmMonitor()
- Costruttore.
getThreadStat
public ThreadStat[] getThreadStat()
- Ritorna le statistiche di tutti i thread attivi.
toString
public java.lang.String toString()
- Ritorna la rappresentazione di questo oggetto.
- Overrides:
- toString in class java.lang.Object
getVersion
public int getVersion()
- Ritorna la versione della classe JvmManager.
run
public static void run(java.lang.String clazz,
java.lang.String[] args)
throws java.lang.Exception
- Carica una classe esterna. La classe deve essere public e contentere
il metodo
static void main(String[] args)
. Viene creato
un nuovo thread che esegue tale metodo.
- Parameters:
clazz
- il nome della classe (completo di package)args
- gli argomenti da passare al main- Throws:
- java.lang.Exception - se la classe non puņ essere trovata, se
non ha accesso public o se non possiede un main