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 int getStatus()
{
if (status != null)
{
return status;
}
if (firstLine == null)
{
return -1;
}
final Matcher matcher = STATUS_PATTERN.matcher(firstLine);
if (matcher.find())
{
status = Integer.parseInt(matcher.group(1));
return status;
}
return -1;
}
}