01: package net.sourceforge.squirrel_sql.fw.util;
02:
03: /**
04: * This message handler just swallows messages sent to it.
05: *
06: * @author <A HREF="mailto:colbell@users.sourceforge.net">Colin Bell</A>
07: */
08: public class NullMessageHandler implements IMessageHandler {
09: private static NullMessageHandler s_handler = new NullMessageHandler();
10:
11: /**
12: * Ctor private becuase this is a singleton.
13: */
14: private NullMessageHandler() {
15: super ();
16: }
17:
18: /**
19: * Return the only instance of this class.
20: *
21: * @return the only instance of this class.
22: */
23: public static NullMessageHandler getInstance() {
24: return s_handler;
25: }
26:
27: /**
28: * Swallow this msg.
29: */
30: public void showMessage(Throwable th, ExceptionFormatter formatter) {
31: // Empty.
32: }
33:
34: /**
35: * Swallow this msg.
36: */
37: public void showMessage(String msg) {
38: // Empty.
39: }
40:
41: /**
42: * Swallow this msg.
43: */
44: public void showErrorMessage(Throwable th,
45: ExceptionFormatter formatter) {
46: // Empty.
47: }
48:
49: /**
50: * Swallow this msg.
51: */
52: public void showErrorMessage(String msg) {
53: // Empty.
54: }
55:
56: public void showWarningMessage(String msg) {
57: // Empty.
58: }
59:
60: }
|