1 /**
2 * AUTOHIT 2003
3 * Copyright Erich P Gatejen (c) 1989,1997,2003,2004
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or (at
8 * your option) any later version.
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
11 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 *
18 * Additional license information can be found in the documentation.
19 * @author Erich P Gatejen
20 */
21 package autohit.server.command;
22
23 import autohit.server.ServerException;
24 import autohit.server.SystemContext;
25
26 /**
27 * Command server interface
28 *
29 * @author Erich P. Gatejen
30 * @version 1.0 <i>Version History</i><code>EPG - Initial - 25Jul03</code>
31 */
32 public interface CommandServer {
33
34 /**
35 * Initialize. You can call this as often as you want, but must be called
36 * at least once.
37 *
38 * @param c
39 * the SystemContext
40 * @throws a
41 * ServerException if unable to initialize
42 */
43 public void init(SystemContext c) throws ServerException;
44
45 /**
46 * Execute a command.
47 *
48 * @param cmd
49 * is a command atom
50 * @throws ServerException
51 * @return printable string of some form. not defined by the interface.
52 */
53 public String execute(CommandAtom cmd) throws ServerException;
54
55 }
|