diff --git a/bindings/java/src/jni/generate.pl b/bindings/java/src/jni/generate.pl index e1000bad..2161b159 100644 --- a/bindings/java/src/jni/generate.pl +++ b/bindings/java/src/jni/generate.pl @@ -34,6 +34,126 @@ sub hash { #this script generates jni code and java classes for the following table +my $nfs_v2 = [ + { + name => 'getattr', type => 'Long', + }, + { + name => 'setattr', type => 'Long', + }, + { + name => 'root', type => 'Long', + }, + { + name => 'lookup', type => 'Long', + }, + { + name => 'readlink', type => 'Long', + }, + { + name => 'read', type => 'Long', + }, + { + name => 'writecache', type => 'Long', + }, + { + name => 'write', type => 'Long', + }, + { + name => 'create', type => 'Long', + }, + { + name => 'remove', type => 'Long', + }, + { + name => 'rename', type => 'Long', + }, + { + name => 'link', type => 'Long', + }, + { + name => 'symlink', type => 'Long', + }, + { + name => 'mkdir', type => 'Long', + }, + { + name => 'rmdir', type => 'Long', + }, + { + name => 'readdir', type => 'Long', + }, + { + name => 'fsstat', type => 'Long', + }, +]; + +my $nfs_v3 = [ + { + name => 'getattr', type => 'Long', + }, + { + name => 'setattr', type => 'Long', + }, + { + name => 'lookup', type => 'Long', + }, + { + name => 'access', type => 'Long', + }, + { + name => 'readlink', type => 'Long', + }, + { + name => 'read', type => 'Long', + }, + { + name => 'write', type => 'Long', + }, + { + name => 'create', type => 'Long', + }, + { + name => 'mkdir', type => 'Long', + }, + { + name => 'symlink', type => 'Long', + }, + { + name => 'mknod', type => 'Long', + }, + { + name => 'remove', type => 'Long', + }, + { + name => 'rmdir', type => 'Long', + }, + { + name => 'rename', type => 'Long', + }, + { + name => 'link', type => 'Long', + }, + { + name => 'readdir', type => 'Long', + }, + { + name => 'readdirplus', type => 'Long', + }, + { + name => 'fsstat', type => 'Long', + }, + { + name => 'fsinfo', type => 'Long', + }, + { + name => 'pathconf', type => 'Long', + }, + { + name => 'commit', type => 'Long', + }, +]; + my %classes = ( Mem => [ { @@ -954,6 +1074,10 @@ my %classes = ( plat => '' }, ], + NfsClientV2 => $nfs_v2, + NfsServerV2 => $nfs_v2, + NfsClientV3 => $nfs_v3, + NfsServerV3 => $nfs_v3, ResourceLimit => [ { name => 'cpu_cur', diff --git a/bindings/java/src/org/hyperic/sigar/Sigar.java b/bindings/java/src/org/hyperic/sigar/Sigar.java index 9e966cd9..72e9a401 100644 --- a/bindings/java/src/org/hyperic/sigar/Sigar.java +++ b/bindings/java/src/org/hyperic/sigar/Sigar.java @@ -786,6 +786,26 @@ public class Sigar implements SigarProxy { return TcpStat.fetch(this); } + public NfsClientV2 getNfsClientV2() + throws SigarException { + return NfsClientV2.fetch(this); + } + + public NfsServerV2 getNfsServerV2() + throws SigarException { + return NfsServerV2.fetch(this); + } + + public NfsClientV3 getNfsClientV3() + throws SigarException { + return NfsClientV3.fetch(this); + } + + public NfsServerV3 getNfsServerV3() + throws SigarException { + return NfsServerV3.fetch(this); + } + /** * Get general network info. * @exception SigarException on failure. diff --git a/bindings/java/src/org/hyperic/sigar/SigarProxy.java b/bindings/java/src/org/hyperic/sigar/SigarProxy.java index bb29cb4f..26773293 100644 --- a/bindings/java/src/org/hyperic/sigar/SigarProxy.java +++ b/bindings/java/src/org/hyperic/sigar/SigarProxy.java @@ -159,6 +159,14 @@ public interface SigarProxy { public TcpStat getTcpStat() throws SigarException; + public NfsClientV2 getNfsClientV2() throws SigarException; + + public NfsServerV2 getNfsServerV2() throws SigarException; + + public NfsClientV3 getNfsClientV3() throws SigarException; + + public NfsServerV3 getNfsServerV3() throws SigarException; + public NetInfo getNetInfo() throws SigarException; public String getFQDN() throws SigarException;