From 96ac948acae44198b4b4554149c2bc37bec3a450 Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Sat, 14 Aug 2004 22:38:57 +0000 Subject: [PATCH] need to declare getServicePid to throw SigarException --- bindings/java/src/net/hyperic/sigar/Sigar.java | 2 +- bindings/java/src/net/hyperic/sigar/SigarProxy.java | 2 +- bindings/java/src/net/hyperic/sigar/SynchronizedSigar.java | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bindings/java/src/net/hyperic/sigar/Sigar.java b/bindings/java/src/net/hyperic/sigar/Sigar.java index 56073440..612e11e1 100644 --- a/bindings/java/src/net/hyperic/sigar/Sigar.java +++ b/bindings/java/src/net/hyperic/sigar/Sigar.java @@ -131,7 +131,7 @@ public class Sigar implements SigarProxy { * This method is implemented on Windows only as a helper * for PTQL. */ - public native long getServicePid(String name); + public native long getServicePid(String name) throws SigarException; /** * Send a signal to a process. diff --git a/bindings/java/src/net/hyperic/sigar/SigarProxy.java b/bindings/java/src/net/hyperic/sigar/SigarProxy.java index 278655b7..cf1a02fa 100644 --- a/bindings/java/src/net/hyperic/sigar/SigarProxy.java +++ b/bindings/java/src/net/hyperic/sigar/SigarProxy.java @@ -13,7 +13,7 @@ public interface SigarProxy { public long getPid(); - public long getServicePid(String name); + public long getServicePid(String name) throws SigarException; public Mem getMem() throws SigarException; diff --git a/bindings/java/src/net/hyperic/sigar/SynchronizedSigar.java b/bindings/java/src/net/hyperic/sigar/SynchronizedSigar.java index bedfd366..e931a63b 100644 --- a/bindings/java/src/net/hyperic/sigar/SynchronizedSigar.java +++ b/bindings/java/src/net/hyperic/sigar/SynchronizedSigar.java @@ -24,6 +24,7 @@ public class SynchronizedSigar implements SigarProxy { } public synchronized long getServicePid(String name) + throws SigarException { return this.sigar.getServicePid(name); }