diff --git a/bindings/java/src/net/hyperic/sigar/Sigar.java b/bindings/java/src/net/hyperic/sigar/Sigar.java index c33bf92a..588b064f 100644 --- a/bindings/java/src/net/hyperic/sigar/Sigar.java +++ b/bindings/java/src/net/hyperic/sigar/Sigar.java @@ -620,6 +620,15 @@ public class Sigar implements SigarProxy { public native Who[] getWhoList() throws SigarException; + /** + * Get general network info. + * @exception SigarException on failure. + */ + public NetInfo getNetInfo() + throws SigarException { + return NetInfo.fetch(this); + } + /** * Get network interface configuration info. * @exception SigarException on failure. diff --git a/bindings/java/src/net/hyperic/sigar/SigarProxy.java b/bindings/java/src/net/hyperic/sigar/SigarProxy.java index 05a479e0..8a43ef45 100644 --- a/bindings/java/src/net/hyperic/sigar/SigarProxy.java +++ b/bindings/java/src/net/hyperic/sigar/SigarProxy.java @@ -125,5 +125,7 @@ public interface SigarProxy { public Who[] getWhoList() throws SigarException; + public NetInfo getNetInfo() throws SigarException; + public String getFQDN() throws SigarException; } diff --git a/bindings/java/src/net/hyperic/sigar/SynchronizedSigar.java b/bindings/java/src/net/hyperic/sigar/SynchronizedSigar.java index be3b0cfe..3d9d887b 100644 --- a/bindings/java/src/net/hyperic/sigar/SynchronizedSigar.java +++ b/bindings/java/src/net/hyperic/sigar/SynchronizedSigar.java @@ -347,6 +347,12 @@ public class SynchronizedSigar implements SigarProxy { return this.sigar.getWhoList(); } + public synchronized NetInfo getNetInfo() + throws SigarException + { + return this.sigar.getNetInfo(); + } + public synchronized String getFQDN() throws SigarException {