| Modifier and Type | Field and Description | 
|---|---|
static String | 
KEY_COMMAND
The key in the map returned by  
toMap() for the command name. | 
static String | 
KEY_ERROR
The key in the map returned by  
toMap() for the error string. | 
| Constructor and Description | 
|---|
CommandResponse(String command)
Creates a new response with no error string. 
 | 
CommandResponse(String command,
               String error)
Creates a new response. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
String | 
getCommand()
Gets the command name. 
 | 
String | 
getError()
Gets the error string (may be null). 
 | 
Object | 
put(String key,
   Object value)
Adds a key/value pair to this response. 
 | 
void | 
putAll(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. 
 | 
public static final String KEY_COMMAND
toMap() for the command name.public static final String KEY_ERROR
toMap() for the error string.public CommandResponse(String command)
command - command namepublic String getCommand()
public String getError()
public Object put(String key, Object value)
key - keyvalue - valuepublic void putAll(Map<? extends String,?> m)
m - map of key/value pairsCopyright © 2008–2021 The Apache Software Foundation. All rights reserved.