|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectSystemManager
SystemManagerWin32
public class SystemManagerWin32
Windows (32-bit) implementation of SystemManager.
Noone should now about this class unless one intends to port it to another operating system.
Use SystemManager.getSystemManager to get OS-specific implementation.
It is important to note here that 32-bit Windows API is used to poll the status information, hence may return unpredictable information on 64-bit systems. This limitation is only due to MinGW32 compiler dependency (which happened not to have 64-bit Windows API headers), otherwise it should be easy to adjust the library implementation for 64-bit API calls.
SystemManager
Constructor Summary | |
---|---|
SystemManagerWin32()
|
Method Summary | |
---|---|
void |
closeProcessHandle(int hProcess)
Closes a process handle (which was opened by openProcessHandle). |
int |
fetchProcessIDs(int[] pids)
Fills the integer array with PIDs (process identifiers) of currently running processes. |
boolean |
fetchProcessStatus(int hProcess,
ProcessStatus ps)
Fills the ps structure with process status information. |
boolean |
fetchSystemMemoryStatus(SystemMemoryStatus sms)
Fills the sms structure with system memory status information. |
String |
getProcessName(int hProcess)
Retrieves the name of executable referenced by process handle. |
static void |
main(String[] args)
This is a sample test of this class. |
int |
openProcessHandle(int processID)
Opens a handle to a process with given identifier. |
Methods inherited from class SystemManager |
---|
getProcessStatus, getSystemManager, getSystemMemoryStatus, loadTmpLibrary |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SystemManagerWin32()
Method Detail |
---|
public boolean fetchSystemMemoryStatus(SystemMemoryStatus sms)
SystemManager
fetchSystemMemoryStatus
in class SystemManager
sms
- the SystemMemoryStatus object, should not be null.
SystemMemoryStatus
public boolean fetchProcessStatus(int hProcess, ProcessStatus ps)
SystemManager
fetchProcessStatus
in class SystemManager
hProcess
- (OS specific) handle to a process, created from
openProcessHandle.ps
- ProcessStatus object, should not be null.
SystemManager.openProcessHandle(int)
,
ProcessStatus
public int openProcessHandle(int processID)
SystemManager
openProcessHandle
in class SystemManager
processID
- (host OS specific) process identifier.
SystemManager.closeProcessHandle(int)
public void closeProcessHandle(int hProcess)
SystemManager
closeProcessHandle
in class SystemManager
hProcess
- the open process handle.SystemManager.openProcessHandle(int)
public int fetchProcessIDs(int[] pids)
SystemManager
fetchProcessIDs
in class SystemManager
pids
- non-null array of integers to be filled with PIDs.
public String getProcessName(int hProcess)
SystemManager
getProcessName
in class SystemManager
hProcess
- is a handle to a process created by openProcessHandle.
public static void main(String[] args)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |