org.asteriskjava.manager.response
Class GetConfigResponse
java.lang.Object
org.asteriskjava.manager.response.ManagerResponse
org.asteriskjava.manager.response.GetConfigResponse
- All Implemented Interfaces:
- java.io.Serializable
public class GetConfigResponse
- extends ManagerResponse
Response that is received when sending a GetConfigAction.
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.
- Since:
- 0.3
- Author:
- martins
- See Also:
GetConfigAction
,
Serialized Form
Method Summary |
java.util.Map<java.lang.Integer,java.lang.String> |
getCategories()
Returns the map of category numbers to category names. |
java.util.Map<java.lang.Integer,java.lang.String> |
getLines(int categoryNumber)
Returns the map of line number to line value for a given category. |
Methods inherited from class org.asteriskjava.manager.response.ManagerResponse |
getActionId, getAttribute, getAttributes, getDateReceived, getEventList, getMessage, getResponse, getServer, getUniqueId, setActionId, setAttributes, setDateReceived, setEventList, setMessage, setResponse, setServer, setUniqueId, stringToInteger, stringToLong, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
GetConfigResponse
public GetConfigResponse()
getCategories
public java.util.Map<java.lang.Integer,java.lang.String> getCategories()
- Returns the map of category numbers to category names.
- Returns:
- the map of category numbers to names.
- See Also:
getLines(int)
getLines
public java.util.Map<java.lang.Integer,java.lang.String> getLines(int categoryNumber)
- Returns the map of line number to line value for a given category.
- Parameters:
categoryNumber
- a valid category number from getCategories.
- Returns:
- the map of category numbers to names.
- See Also:
getCategories()
Copyright © 2004-2009 Stefan Reuter. All Rights Reserved.