Package org.apache.geode.management.cli
Class CommandService
java.lang.Object
org.apache.geode.management.cli.CommandService
Deprecated.
since 1.3 use OnlineCommandProcessor directly
Processes remote GemFire Command Line Interface (CLI) commands. Refer to the vFabric GemFire
documentation for information regarding local vs. remote commands.
NOTE: CommandService is currently available only on GemFire Manager nodes.
- Since:
- GemFire 7.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract CommandStatementcreateCommandStatement(String commandString) Deprecated.since Geode 1.3, simply call processCommand to execute the commandprotected abstract CommandStatementcreateCommandStatement(String commandString, Map<String, String> env) Deprecated.since Geode 1.3, simply call processCommand to execute the commandstatic CommandServicecreateLocalCommandService(Cache cache) Deprecated.Returns a newly created or existing instance of theCommandServiceassociated with the specifiedCache.static CommandServiceDeprecated.Returns an existing 'usable'CommandService.abstract booleanisUsable()Deprecated.Returns whether the underlyingCacheexists and is not closed.abstract ResultprocessCommand(String commandString) Deprecated.Processes the specified command string.protected abstract ResultprocessCommand(String commandString, Map<String, String> env) Deprecated.Processes the specified command string.
-
Field Details
-
EMPTY_ENV
Deprecated.
-
-
Constructor Details
-
CommandService
public CommandService()Deprecated.
-
-
Method Details
-
isUsable
public abstract boolean isUsable()Deprecated.Returns whether the underlyingCacheexists and is not closed. The Cache must be ready in order for commands to be processed using thisCommandService. A call to this method should be made before attempting to process commands.- Returns:
- True if the
Cacheexists and is not closed, false otherwise.
-
processCommand
Deprecated.Processes the specified command string. Only remote commands can be processed using this method. Refer to the vFabric GemFire documentation for details.- Parameters:
commandString- Command string to be processed.- Returns:
- The
Resultof the execution of this command string.
-
processCommand
Deprecated.Processes the specified command string. Only remote commands can be processed using this method. Refer to the vFabric GemFire documentation for details.- Parameters:
commandString- Command string to be processed.env- Environmental values that will be used during the execution of this command.- Returns:
- The
Resultof the execution of this command string.
-
createCommandStatement
Deprecated.since Geode 1.3, simply call processCommand to execute the commandCreates aCommandStatementfrom the specified command string. Only remote commands can be processed using this method. Refer to the vFabric GemFire documentation for details.- Parameters:
commandString- Command string from which to create aCommandStatement.- Returns:
- A
CommandStatementwhich can be used to repeatedly process the same command. - See Also:
-
createCommandStatement
@Deprecated protected abstract CommandStatement createCommandStatement(String commandString, Map<String, String> env) Deprecated.since Geode 1.3, simply call processCommand to execute the commandCreates aCommandStatementfrom the specified command string. Only remote commands can be processed using this method. Refer to the vFabric GemFire documentation for details.- Parameters:
commandString- Command string from which to create aCommandStatement.env- Environmental values that will be used during the execution of this command.- Returns:
- A
CommandStatementwhich can be used to repeatedly process the same command. - See Also:
-
createLocalCommandService
Deprecated.Returns a newly created or existing instance of theCommandServiceassociated with the specifiedCache.- Parameters:
cache- UnderlyingCacheinstance to be used to create a Command Service.- Returns:
- a newly created or existing instance of the
CommandServiceassociated with the specifiedCache - Throws:
CommandServiceException- If command service could not be initialized.
-
getUsableLocalCommandService
Deprecated.Returns an existing 'usable'CommandService. ACommandServiceis considered usable if at has an underlyingCachewhich is not closed.- Returns:
- A usable
CommandServiceor null if one cannot be found.
-