class AgiReplyImpl {
public String getResult()
{
if (result != null)
{
return result;
}
final Matcher matcher = RESULT_PATTERN.matcher(firstLine);
if (matcher.find())
{
result = matcher.group(1);
}
else
result = "";
return result;
}
}
class AgiReplyImpl {
public String getSynopsis()
{
if (getStatus() != SC_INVALID_COMMAND_SYNTAX)
{
return null;
}
if (synopsis == null && lines.size() > 1)
{
final String secondLine;
final Matcher synopsisMatcher;
secondLine = lines.get(1);
synopsisMatcher = SYNOPSIS_PATTERN.matcher(secondLine);
if (synopsisMatcher.find())
{
synopsis = synopsisMatcher.group(1);
}
}
return synopsis;
}
}