public static class AsteriskHandler.AmiStringMap extends StringMap
AMI responses are either:
--END COMMAND--Unfortunately, the first line of the following response can have a ":" in it, making it indistinguishable from another header [they should'a added a blank line after the last header]. We need to use some heuristics to figure out if it's a header or data. grumph!
XXX to do:
Any time data follows, the "ActionID" key (if present) will always
be the last key before the data starts. We could use that, or if
the data consists of what looks like headers, then just make them
headers, and don't stuff them into "data", which is sort-of what
happens now.
In the second case, all the response data is put in a header called:
data:
This is modelled after MimeHeaders.
Constructor and Description |
---|
AsteriskHandler.AmiStringMap() |
AsteriskHandler.AmiStringMap(StringMap map) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
commandify(java.lang.String id)
Turn an AmiMap into an asterisk command.
|
static java.lang.String |
commandify(StringMap map,
java.lang.String id) |
void |
read(HttpInputStream in) |
public AsteriskHandler.AmiStringMap()
public AsteriskHandler.AmiStringMap(StringMap map)
public void read(HttpInputStream in) throws java.io.IOException
java.io.IOException
public java.lang.String commandify(java.lang.String id)
public static java.lang.String commandify(StringMap map, java.lang.String id)