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.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.forgerock.opendj.cli.Tool
com.forgerock.opendj.cli.Tool.Style -
Method Summary
Modifier and TypeMethodDescriptionbooleanisQuiet()Indicates whether the user has requested quiet output.static voidThe stop-ds tool main method.static intmainStopDs(String[] args, PrintStream outStream, PrintStream errStream) Processes the command-line arguments and invokes stop-ds.com.forgerock.opendj.cli.ReturnCodeRun thisTooltool 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 Details
-
main
The stop-ds tool main method.- Parameters:
args- The command-line arguments provided to this program.
-
mainStopDs
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, ornullif standard output is not needed.errStream- The print stream to use for standard error, ornullif 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.ToolIndicates whether the user has requested quiet output. The default implementation returnsfalse.- Overrides:
isQuietin classcom.forgerock.opendj.cli.Tool- Returns:
trueif 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.ToolRun thisTooltool 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:
runin classcom.forgerock.opendj.cli.Tool- Parameters:
args- Arguments set to pass to the tool.- Returns:
0if 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.
-