public class GetConfigResponse extends ManagerResponse
Asterisk's response to the GetConfig command is ugly, and requires some parsing of attributes. This class lazily parses its own attributes to hide the ugly details. If the file requested exists but does not contain at least a line with a category, the ResponseBuilder won't create an instance of GetConfigResponse, as it won't know what the empty response is.
GetConfigAction
,
Serialized FormConstructor and Description |
---|
GetConfigResponse() |
Modifier and Type | Method and Description |
---|---|
Map<Integer,String> |
getCategories()
Returns the map of category numbers to category names.
|
Map<Integer,String> |
getLines(int categoryNumber)
Returns the map of line number to line value for a given category.
|
getActionId, getAttribute, getAttributes, getDateReceived, getEventList, getEvents, getMessage, getOutput, getResponse, getServer, getUniqueId, setActionId, setAttributes, setDateReceived, setEventList, setEvents, setMessage, setOutput, setResponse, setServer, setUniqueId, stringToInteger, stringToLong, toString
public Map<Integer,String> getCategories()
getLines(int)
public Map<Integer,String> getLines(int categoryNumber)
categoryNumber
- a valid category number from getCategories.getCategories()
Copyright © 2004–2017. All rights reserved.