Ignore:
Timestamp:
09/26/11 22:55:19 (13 years ago)
Author:
sherbold
Message:

Major change to the Console provided by this library. The interface de.ugoe.cs.console.ConsoleObserver? is deprecated and split into the five interface IOutputListener, IErrorListener, ITraceListener, IExceptionListener, and ICommandListener.

The rational for this change is to provide the possibility to listen to only parts of what is send to the console to provide better capabilities for target-oriented handling of the different streams, e.g., for exception logging.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaHelperLib/src/de/ugoe/cs/util/console/TextConsole.java

    r186 r199  
    22 
    33import java.io.IOException; 
     4 
     5import de.ugoe.cs.util.console.listener.IErrorListener; 
     6import de.ugoe.cs.util.console.listener.IExceptionListener; 
     7import de.ugoe.cs.util.console.listener.IOutputListener; 
     8import de.ugoe.cs.util.console.listener.ITraceListener; 
    49 
    510/** 
     
    1217 * @version 1.0 
    1318 */ 
    14 public class TextConsole implements ConsoleObserver { 
     19public class TextConsole implements IOutputListener, IErrorListener, 
     20                ITraceListener, IExceptionListener { 
    1521 
    1622        /** 
     
    2733         */ 
    2834        public TextConsole() { 
    29                 Console.getInstance().registerObserver(this); 
     35                Console.getInstance().registerOutputListener(this); 
     36                Console.getInstance().registerErrorListener(this); 
     37                Console.getInstance().registerTraceListener(this); 
     38                Console.getInstance().registerExceptionListener(this); 
    3039        } 
    3140 
     
    118127        } 
    119128 
    120         /** 
    121          * <p> 
    122          * The {@link TextConsole} ignores this notification. 
    123          * </p> 
    124          *  
    125          * @see de.ugoe.cs.util.console.ConsoleObserver#commandNotification(java.lang.String) 
    126          */ 
    127         @Override 
    128         public void commandNotification(String command) { 
    129                 // ignores the notification 
    130         } 
    131129} 
Note: See TracChangeset for help on using the changeset viewer.