Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## uk.ac.man.bioinf.debug
Class DebugMultiplexer

    java.lang.Object
      |
      +--uk.ac.man.bioinf.debug.DebugMultiplexer

All Implemented Interfaces:
  DebugInterface

public class DebugMultiplexer
extends Object
implements DebugInterface

DebugMultiplexer.java This class can be used to multiplex other DebugInterface interfaces. It implements DebugInterface directly, rather than extending AbstractInterface, because I want to make no assumptions at all about the instances which it contains. This class has two relevant methods public methods to install and remove other DebugInterface instances. The first time install is called the multiplexer automatically installs itself as the primary DebugInterface instance. If all but one of its DebugInterface instances are removed from it, then it will replace itself as the primary interface with a DefaultDebug instance. If any of the Debug instances fail at any time in any of their methods, they will be removed. If Debug is true all of the others instances will be informed of this. Created: Sun May 7 20:49:33 2000

Version:
  $Id: DebugMultiplexer.java,v 1.3 2001/04/11 17:04:42 lord Exp $
Author:
  Phillip Lord

Method Summary
`static DebugInterface` | `addDebugInstance(DebugInterface deb)` Add a new Debug Interface instance.
`void` | `both(Class cla, Object message, Throwable th)`
`void` | `both(Class cla, String message, Throwable th)`
`void` | `both(Object obj, Object message, Throwable th)`
`void` | `both(Object obj, String message, Throwable th)`
`void` | `message(Class cla, Object message)`
`void` | `message(Class cla, String message)`
`void` | `message(Object obj, Object message)`
`void` | `message(Object obj, String message)`
`static DebugInterface` | `removeDebugInstance(DebugInterface deb)` Remove a DebugInterface instance from the multiplexer.
`void` | `throwable(Class cla, Throwable th)`
`void` | `throwable(Object obj, Throwable th)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### addDebugInstance

    public static DebugInterface addDebugInstance(DebugInterface deb)

  Add a new Debug Interface instance. This method ensures that the Multiplexer is installed if it has not been so far. Note that this means the old debug instance is silently replaced and junked!

  Parameters:
    `deb` -
  Returns:

### removeDebugInstance

    public static DebugInterface removeDebugInstance(DebugInterface deb)

  Remove a DebugInterface instance from the multiplexer.

  Parameters:
    `deb` - the interface to remove
  Returns:
    the interface removed. Null if the deb wasnt there

### message

    public void message(Object obj,
                        String message)

  Specified by:
    `message` in interface `DebugInterface`

### message

    public void message(Object obj,
                        Object message)

  Specified by:
    `message` in interface `DebugInterface`

### message

    public void message(Class cla,
                        String message)

  Specified by:
    `message` in interface `DebugInterface`

### message

    public void message(Class cla,
                        Object message)

  Specified by:
    `message` in interface `DebugInterface`

### throwable

    public void throwable(Object obj,
                          Throwable th)

  Specified by:
    `throwable` in interface `DebugInterface`

### throwable

    public void throwable(Class cla,
                          Throwable th)

  Specified by:
    `throwable` in interface `DebugInterface`

### both

    public void both(Object obj,
                     String message,
                     Throwable th)

  Specified by:
    `both` in interface `DebugInterface`

### both

    public void both(Class cla,
                     String message,
                     Throwable th)

  Specified by:
    `both` in interface `DebugInterface`

### both

    public void both(Object obj,
                     Object message,
                     Throwable th)

  Specified by:
    `both` in interface `DebugInterface`

### both

    public void both(Class cla,
                     Object message,
                     Throwable th)

  Specified by:
    `both` in interface `DebugInterface`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD