Class CommandResponse
- java.lang.Object
- 
- org.apache.zookeeper.server.admin.CommandResponse
 
- 
- 
Constructor SummaryConstructors Constructor Description CommandResponse(String command)Creates a new response with no error string.CommandResponse(String command, String error)Creates a new response.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetCommand()Gets the command name.StringgetError()Gets the error string (may be null).Objectput(String key, Object value)Adds a key/value pair to this response.voidputAll(Map<? extends String,?> m)Adds all key/value pairs in the given map to this response.Map<String,Object>toMap()Converts this response to a map.
 
- 
- 
- 
Field Detail- 
KEY_COMMANDpublic static final String KEY_COMMAND The key in the map returned bytoMap()for the command name.- See Also:
- Constant Field Values
 
 - 
KEY_ERRORpublic static final String KEY_ERROR The key in the map returned bytoMap()for the error string.- See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
CommandResponsepublic CommandResponse(String command) Creates a new response with no error string.- Parameters:
- command- command name
 
 
- 
 - 
Method Detail- 
getCommandpublic String getCommand() Gets the command name.- Returns:
- command name
 
 - 
getErrorpublic String getError() Gets the error string (may be null).- Returns:
- error string
 
 - 
putpublic Object put(String key, Object value) Adds a key/value pair to this response.- Parameters:
- key- key
- value- value
- Returns:
- prior value for key, or null if none
 
 - 
putAllpublic void putAll(Map<? extends String,?> m) Adds all key/value pairs in the given map to this response.- Parameters:
- m- map of key/value pairs
 
 
- 
 
-