Package org.opends.server.tools
Class StopDs
- java.lang.Object
-
- com.forgerock.opendj.cli.Tool
-
- org.opends.server.tools.StopDs
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
public final class StopDs extends com.forgerock.opendj.cli.Tool
This class provides a tool that can send a request to the Directory Server that will cause it to shut down.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isQuiet()
Indicates whether the user has requested quiet output.static void
main(String[] args)
The stop-ds tool main method.static int
mainStopDs(String[] args, PrintStream outStream, PrintStream errStream)
Processes the command-line arguments and invokes stop-ds.com.forgerock.opendj.cli.ReturnCode
run(String... args)
Run thisTool
tool with the provided arguments.-
Methods inherited from class com.forgerock.opendj.cli.Tool
askPort, close, confirmAction, enableConsoleLoggingIfVerbose, errPrintln, errPrintln, errPrintln, errPrintlnSurroundedByBlankLines, errPrintVerboseMessage, flush, flushLogStream, getErrorStream, getErrStream, getInputStream, getOutputStream, isFullyInteractive, isScriptFriendly, isVerbose, logVerboseMessage, mayPrompt, parseArguments, pressReturnToContinue, print, println, println, println, printlnNoWrap, printlnSurroundedByBlankLines, printNoWrap, readInput, readInput, readInputAllowEmpty, readLineOfInput, readPassword, readValidatedInput, readValidatedInputOrThrow, report
-
-
-
-
Method Detail
-
main
public static void main(String[] args)
The stop-ds tool main method.- Parameters:
args
- The command-line arguments provided to this program.
-
mainStopDs
public static int mainStopDs(String[] args, PrintStream outStream, PrintStream errStream)
Processes the command-line arguments and invokes stop-ds.- Parameters:
args
- The command-line arguments provided to this program.outStream
- The print stream to use for standard output, ornull
if standard output is not needed.errStream
- The print stream to use for standard error, ornull
if standard error is not needed.- Returns:
- An int representing the stop-ds tool return code.
-
isQuiet
public boolean isQuiet()
Description copied from class:com.forgerock.opendj.cli.Tool
Indicates whether the user has requested quiet output. The default implementation returnsfalse
.- Overrides:
isQuiet
in classcom.forgerock.opendj.cli.Tool
- Returns:
true
if the user has requested quiet output.
-
run
public com.forgerock.opendj.cli.ReturnCode run(String... args) throws com.forgerock.opendj.cli.ClientException
Description copied from class:com.forgerock.opendj.cli.Tool
Run thisTool
tool with the provided arguments. Output and errors will be written on the provided streams.This method can be used to run the tool programmatically.
- Overrides:
run
in classcom.forgerock.opendj.cli.Tool
- Parameters:
args
- Arguments set to pass to the tool.- Returns:
0
if all processing completed successfully, or non-zero if an error occurred.- Throws:
com.forgerock.opendj.cli.ClientException
- If an error occurs while running the tool.
-
-