use method overloading instead of stupid AndWaitFor methods

This commit is contained in:
Doug MacEachern 2005-06-26 04:09:56 +00:00
parent 490bc9906e
commit ff25200d99
1 changed files with 9 additions and 27 deletions

View File

@ -183,25 +183,6 @@ public class Service extends Win32 {
ChangeServiceDescription(this.service, description); 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 * @deprecated
* @see #getStatus() * @see #getStatus()
@ -228,13 +209,7 @@ public class Service extends Win32 {
} }
} }
public void stopAndWait() throws Win32Exception public void stop(long timeout) throws Win32Exception
{
// Wait indefinitely
stopAndWait(0);
}
public void stopAndWait(long timeout) throws Win32Exception
{ {
long status; 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; long status;
boolean result = true; boolean result = true;