From ff25200d99981eb955d3bbcfdd0fdd6fc0c6bb12 Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Sun, 26 Jun 2005 04:09:56 +0000 Subject: [PATCH] use method overloading instead of stupid AndWaitFor methods --- .../src/net/hyperic/sigar/win32/Service.java | 36 +++++-------------- 1 file changed, 9 insertions(+), 27 deletions(-) diff --git a/bindings/java/src/net/hyperic/sigar/win32/Service.java b/bindings/java/src/net/hyperic/sigar/win32/Service.java index 04d3fe25..e641049e 100644 --- a/bindings/java/src/net/hyperic/sigar/win32/Service.java +++ b/bindings/java/src/net/hyperic/sigar/win32/Service.java @@ -183,25 +183,6 @@ public class Service extends Win32 { ChangeServiceDescription(this.service, description); } - public void start() throws Win32Exception - { - if (StartService(this.service) == false) { - throw getLastErrorException(); - } - } - - public void startAndWait() throws Win32Exception - { - // Wait indefinitely - startAndWait(0); - } - - public void startAndWait(long timeout) throws Win32Exception - { - start(); - waitForStart(timeout); - } - /** * @deprecated * @see #getStatus() @@ -228,13 +209,7 @@ public class Service extends Win32 { } } - public void stopAndWait() throws Win32Exception - { - // Wait indefinitely - stopAndWait(0); - } - - public void stopAndWait(long timeout) throws Win32Exception + public void stop(long timeout) throws Win32Exception { long status; @@ -265,7 +240,14 @@ public class Service extends Win32 { } } - public void waitForStart(long timeout) throws Win32Exception + public void start() throws Win32Exception + { + if (StartService(this.service) == false) { + throw getLastErrorException(); + } + } + + public void start(long timeout) throws Win32Exception { long status; boolean result = true;