org.opends.server.tools
Class StopWindowsService

java.lang.Object
  extended by org.opends.server.tools.StopWindowsService

public class StopWindowsService
extends java.lang.Object

This class is used to stop the Windows service associated with this instance on this machine. This tool allows to stop OpenDS as a Windows service.


Field Summary
static int SERVICE_ALREADY_STOPPED
          The service was already stopped.
static int SERVICE_NOT_FOUND
          The service could not be found.
static int SERVICE_STOP_ERROR
          The service could not be stopped.
static int SERVICE_STOP_SUCCESSFUL
          The service was successfully stopped.
 
Constructor Summary
StopWindowsService()
           
 
Method Summary
static void main(java.lang.String[] args)
          Invokes the net stop on the service corresponding to this server.
static int stopWindowsService(java.io.OutputStream outStream, java.io.OutputStream errStream)
          Invokes the net stop on the service corresponding to this server, it writes information and error messages in the provided streams.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SERVICE_STOP_SUCCESSFUL

public static int SERVICE_STOP_SUCCESSFUL
The service was successfully stopped.


SERVICE_NOT_FOUND

public static int SERVICE_NOT_FOUND
The service could not be found.


SERVICE_ALREADY_STOPPED

public static int SERVICE_ALREADY_STOPPED
The service was already stopped.


SERVICE_STOP_ERROR

public static int SERVICE_STOP_ERROR
The service could not be stopped.

Constructor Detail

StopWindowsService

public StopWindowsService()
Method Detail

main

public static void main(java.lang.String[] args)
Invokes the net stop on the service corresponding to this server.

Parameters:
args - The command-line arguments provided to this program.

stopWindowsService

public static int stopWindowsService(java.io.OutputStream outStream,
                                     java.io.OutputStream errStream)
Invokes the net stop on the service corresponding to this server, it writes information and error messages in the provided streams.

Parameters:
outStream - The stream to write standard output messages.
errStream - The stream to write error messages.
Returns:
SERVICE_STOP_SUCCESSFUL, SERVICE_NOT_FOUND, SERVICE_ALREADY_STOPPED or SERVICE_STOP_ERROR depending on whether the service could be stopped or not.