~ubuntu-branches/ubuntu/wily/libjboss-remoting-java/wily

« back to all changes in this revision

Viewing changes to src/main/org/jboss/remoting/samples/chat/utility/Debug.java

  • Committer: Package Import Robot
  • Author(s): Torsten Werner
  • Date: 2011-09-09 14:01:03 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: package-import@ubuntu.com-20110909140103-hqokx61534tas9rg
Tags: 2.5.3.SP1-1
* Newer but not newest upstream release. Do not build samples.
* Change debian/watch to upstream's svn repo.
* Add patch to fix compile error caused by tomcat update.
  (Closes: #628303)
* Switch to source format 3.0.
* Switch to debhelper level 7.
* Remove useless Depends.
* Update Standards-Version: 3.9.2.
* Update README.source.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
package org.jboss.remoting.samples.chat.utility;
 
2
 
 
3
/**
 
4
 * <p>Title: Chat4</p>
 
5
 * <p>Description: </p>
 
6
 * <p>Copyright: Copyright (c) 2003</p>
 
7
 * <p>Company: </p>
 
8
 * @author not attributable
 
9
 * @version 1.0
 
10
 */
 
11
 
 
12
 
 
13
public class Debug {
 
14
  private static boolean on = false;
 
15
 
 
16
  public static void turnOn()
 
17
  {
 
18
    on = true;
 
19
    System.out.println("Debug: chat debugging turned on");
 
20
  }
 
21
 
 
22
  public static void turnOff()
 
23
  {
 
24
    on = false;
 
25
    System.out.println("Debug: chat debugging turned on");
 
26
    }
 
27
 
 
28
  public static boolean isOn()
 
29
  {
 
30
    return on;
 
31
  }
 
32
 
 
33
  public static void println(String str) {
 
34
    if (on)
 
35
      if (str != null)
 
36
        System.out.println(str);
 
37
      else
 
38
        System.out.println("null");
 
39
  }
 
40
}