add NetInfo getters

This commit is contained in:
Doug MacEachern 2005-07-11 20:22:16 +00:00
parent 63afc8aa07
commit 0677fa7fe8
3 changed files with 17 additions and 0 deletions

View File

@ -620,6 +620,15 @@ public class Sigar implements SigarProxy {
public native Who[] getWhoList() public native Who[] getWhoList()
throws SigarException; throws SigarException;
/**
* Get general network info.
* @exception SigarException on failure.
*/
public NetInfo getNetInfo()
throws SigarException {
return NetInfo.fetch(this);
}
/** /**
* Get network interface configuration info. * Get network interface configuration info.
* @exception SigarException on failure. * @exception SigarException on failure.

View File

@ -125,5 +125,7 @@ public interface SigarProxy {
public Who[] getWhoList() throws SigarException; public Who[] getWhoList() throws SigarException;
public NetInfo getNetInfo() throws SigarException;
public String getFQDN() throws SigarException; public String getFQDN() throws SigarException;
} }

View File

@ -347,6 +347,12 @@ public class SynchronizedSigar implements SigarProxy {
return this.sigar.getWhoList(); return this.sigar.getWhoList();
} }
public synchronized NetInfo getNetInfo()
throws SigarException
{
return this.sigar.getNetInfo();
}
public synchronized String getFQDN() public synchronized String getFQDN()
throws SigarException throws SigarException
{ {