add NetStat getters
This commit is contained in:
parent
748d605ecb
commit
7333533c82
|
@ -602,7 +602,12 @@ public class Sigar implements SigarProxy {
|
||||||
* @exception SigarException on failure.
|
* @exception SigarException on failure.
|
||||||
*/
|
*/
|
||||||
public native NetConnection[] getNetConnectionList(int flags)
|
public native NetConnection[] getNetConnectionList(int flags)
|
||||||
throws SigarException;
|
throws SigarException;
|
||||||
|
|
||||||
|
public NetStat getNetStat()
|
||||||
|
throws SigarException {
|
||||||
|
return new NetStat(this);
|
||||||
|
}
|
||||||
|
|
||||||
public native Who[] getWhoList()
|
public native Who[] getWhoList()
|
||||||
throws SigarException;
|
throws SigarException;
|
||||||
|
|
|
@ -119,6 +119,8 @@ public interface SigarProxy {
|
||||||
|
|
||||||
public String[] getNetInterfaceList() throws SigarException;
|
public String[] getNetInterfaceList() throws SigarException;
|
||||||
|
|
||||||
|
public NetStat getNetStat() throws SigarException;
|
||||||
|
|
||||||
public Who[] getWhoList() throws SigarException;
|
public Who[] getWhoList() throws SigarException;
|
||||||
|
|
||||||
public String getFQDN() throws SigarException;
|
public String getFQDN() throws SigarException;
|
||||||
|
|
|
@ -329,6 +329,12 @@ public class SynchronizedSigar implements SigarProxy {
|
||||||
return this.sigar.getNetInterfaceList();
|
return this.sigar.getNetInterfaceList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public synchronized NetStat getNetStat()
|
||||||
|
throws SigarException
|
||||||
|
{
|
||||||
|
return new NetStat(this.sigar);
|
||||||
|
}
|
||||||
|
|
||||||
public synchronized Who[] getWhoList()
|
public synchronized Who[] getWhoList()
|
||||||
throws SigarException
|
throws SigarException
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue