Class CommandResponse
java.lang.Object
org.apache.zookeeper.server.admin.CommandResponse
A response from running a
Command
.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCommandResponse
(String command) Creates a new response with no error string.CommandResponse
(String command, String error) Creates a new response. -
Method Summary
-
Field Details
-
Constructor Details
-
CommandResponse
Creates a new response with no error string.- Parameters:
command
- command name
-
CommandResponse
Creates a new response.- Parameters:
command
- command nameerror
- error string (may be null)
-
-
Method Details
-
getCommand
Gets the command name.- Returns:
- command name
-
getError
Gets the error string (may be null).- Returns:
- error string
-
put
Adds a key/value pair to this response.- Parameters:
key
- keyvalue
- value- Returns:
- prior value for key, or null if none
-
putAll
Adds all key/value pairs in the given map to this response.- Parameters:
m
- map of key/value pairs
-
toMap
Converts this response to a map. The returned map is mutable, and changes to it do not reflect back into this response.- Returns:
- map representation of response
-