Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/fastagi
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23072/src/java/net/sf/asterisk/fastagi
Added Files:
InvalidOrUnknownCommandException.java
InvalidCommandSyntaxException.java
Log Message:
Fixed InvalidCommandSyntaxException and InvalidOrUnknownCommandException
--- NEW FILE: InvalidOrUnknownCommandException.java ---
/*
* Copyright 2004-2005 Stefan Reuter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package net.sf.asterisk.fastagi;
/**
* An InvalidOrUnknownCommandException is thrown when the reader receives a reply
* with status code 510.
*
* @author srt
* @version $Id: InvalidOrUnknownCommandException.java,v 1.1 2005/03/11 19:34:55 srt Exp $
*/
public class InvalidOrUnknownCommandException extends AGIException
{
/**
* Serial version identifier.
*/
private static final long serialVersionUID = 3257002168165807929L;
/**
* Creates a new InvalidOrUnknownCommandException.
*
* @param synopsis the synopsis of the command.
* @param usage the usage of the command.
*/
public InvalidOrUnknownCommandException()
{
super("Invalid or unknown command.");
}
}
--- NEW FILE: InvalidCommandSyntaxException.java ---
/*
* Copyright 2004-2005 Stefan Reuter
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package net.sf.asterisk.fastagi;
/**
* An InvalidCommandSyntaxException is thrown when the reader receives a reply
* with status code 520.
*
* @author srt
* @version $Id: InvalidCommandSyntaxException.java,v 1.1 2005/03/11 19:34:55 srt Exp $
*/
public class InvalidCommandSyntaxException extends AGIException
{
/**
* Serial version identifier.
*/
private static final long serialVersionUID = 3257002168165807929L;
private String synopsis;
private String usage;
/**
* Creates a new InvalidCommandSyntaxException with the given synopsis and
* usage.
*
* @param synopsis the synopsis of the command.
* @param usage the usage of the command.
*/
public InvalidCommandSyntaxException(String synopsis, String usage)
{
super("Invalid command syntax: " + synopsis);
this.synopsis = synopsis;
this.usage = usage;
}
/**
* Returns the synopsis of the command that was called with invalid syntax.
*
* @return the synopsis of the command that was called with invalid syntax.
*/
public String getSynopsis()
{
return synopsis;
}
/**
* Returns a description of the command that was called with invalid syntax.
*
* @return a description of the command that was called with invalid syntax.
*/
public String getUsage()
{
return usage;
}
}
|