1 package org.sapia.console; 2 3 4 /** 5 * Listener that is called back by a <code>CommandConsole</code> 6 * instance at various moments. 7 * 8 * @author Yanick Duchesne 9 * 29-Nov-02 10 */ 11 public interface ConsoleListener { 12 /** 13 * Called when the console starts (can be implemented to display 14 * welcome message). 15 */ 16 public void onStart(Console cons); 17 18 /** 19 * Called when the console cannot interpret a given command (Can be 20 * implemented to display an error message). 21 */ 22 public void onCommandNotFound(Console cons, String commandName); 23 24 /** 25 * Called when the console exits (can be implemented to display a 26 * good-bye message). 27 */ 28 public void onAbort(Console cons); 29 } 30