add NetStat getters

This commit is contained in:
Doug MacEachern 2005-05-10 16:13:37 +00:00
parent 748d605ecb
commit 7333533c82
3 changed files with 14 additions and 1 deletions

View File

@ -602,8 +602,13 @@ public class Sigar implements SigarProxy {
* @exception SigarException on failure.
*/
public native NetConnection[] getNetConnectionList(int flags)
throws SigarException;
throws SigarException;
public NetStat getNetStat()
throws SigarException {
return new NetStat(this);
}
public native Who[] getWhoList()
throws SigarException;

View File

@ -119,6 +119,8 @@ public interface SigarProxy {
public String[] getNetInterfaceList() throws SigarException;
public NetStat getNetStat() throws SigarException;
public Who[] getWhoList() throws SigarException;
public String getFQDN() throws SigarException;

View File

@ -329,6 +329,12 @@ public class SynchronizedSigar implements SigarProxy {
return this.sigar.getNetInterfaceList();
}
public synchronized NetStat getNetStat()
throws SigarException
{
return new NetStat(this.sigar);
}
public synchronized Who[] getWhoList()
throws SigarException
{