add NetInfo getters
This commit is contained in:
parent
63afc8aa07
commit
0677fa7fe8
|
@ -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.
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue