source: trunk/JavaHelperLib/src/de/ugoe/cs/util/console/ConsoleObserver.java @ 186

Last change on this file since 186 was 186, checked in by sherbold, 13 years ago
  • modified CommandExecuter? and Console make use of the command notification for observers
File size: 1.2 KB
Line 
1package de.ugoe.cs.util.console;
2
3/**
4 * <p>
5 * Observer for Console.
6 * </p>
7 *
8 * @author Steffen Herbold
9 * @version 1.0
10 */
11public interface ConsoleObserver {
12
13        /**
14         * <p>
15         * If a new message is send to the console, all observers are updated using
16         * this method.
17         * </p>
18         *
19         * @param newMessage
20         *            message that was send to the console.
21         */
22        public void updateText(String newMessage);
23
24        /**
25         * <p>
26         * Send messages to the error stream of all observers.
27         * </p>
28         *
29         * @param errMessage
30         *            error message
31         */
32        public void errStream(String errMessage);
33
34        /**
35         * <p>
36         * Send messages to the trace stream of all observers.
37         * </p>
38         *
39         * @param traceMesssage
40         *            error message
41         */
42        public void trace(String traceMessage);
43
44        /**
45         * <p>
46         * Prints the stack trace of an exception.
47         * </p>
48         *
49         * @param e
50         *            exception whose stack trace is to be printed
51         */
52        public void printStacktrace(Exception e);
53
54        /**
55         * <p>
56         * Receives the command strings of all executed commands.
57         * </p>
58         *
59         * @param command
60         *            string of the command.
61         */
62        public void commandNotification(String command);
63
64}
Note: See TracBrowser for help on using the repository browser.