1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package net.sf.asterisk.fastagi;
18
19 /***
20 * An InvalidCommandSyntaxException is thrown when the reader receives a reply
21 * with status code 520.
22 *
23 * @author srt
24 * @version $Id: InvalidCommandSyntaxException.java,v 1.1 2005/03/11 19:34:55 srt Exp $
25 */
26 public class InvalidCommandSyntaxException extends AGIException
27 {
28 /***
29 * Serial version identifier.
30 */
31 private static final long serialVersionUID = 3257002168165807929L;
32
33 private String synopsis;
34 private String usage;
35
36 /***
37 * Creates a new InvalidCommandSyntaxException with the given synopsis and
38 * usage.
39 *
40 * @param synopsis the synopsis of the command.
41 * @param usage the usage of the command.
42 */
43 public InvalidCommandSyntaxException(String synopsis, String usage)
44 {
45 super("Invalid command syntax: " + synopsis);
46 this.synopsis = synopsis;
47 this.usage = usage;
48 }
49
50 /***
51 * Returns the synopsis of the command that was called with invalid syntax.
52 *
53 * @return the synopsis of the command that was called with invalid syntax.
54 */
55 public String getSynopsis()
56 {
57 return synopsis;
58 }
59
60 /***
61 * Returns a description of the command that was called with invalid syntax.
62 *
63 * @return a description of the command that was called with invalid syntax.
64 */
65 public String getUsage()
66 {
67 return usage;
68 }
69 }