Source code: org/dinopolis/util/debug/DebugMessageTHREADGROUP.java
1 /***********************************************************************
2 * @(#)$RCSfile: DebugMessageTHREADGROUP.java,v $ $Revision: 1.1.1.1 $ $Date: 2003/01/10 15:33:37 $
3 *
4 * Copyright (c) 2000 IICM, Graz University of Technology
5 * Inffeldgasse 16c, A-8010 Graz, Austria.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License (LGPL)
9 * as published by the Free Software Foundation; either version 2.1 of
10 * the License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this program; if not, write to the
19 * Free Software Foundation, Inc.,
20 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 ***********************************************************************/
22
23
24 package org.dinopolis.util.debug;
25
26 //______________________________________________________________________
27 //______________________________________________________________________
28 /**
29 * This class is chosen by the DebugMessageFactory depending on the
30 * token used in the message format.
31 *
32 * This implementation returns the name of the threadgroup of the current
33 * thread.
34 *
35 */
36 public class DebugMessageTHREADGROUP extends DebugMessageFormatObject
37 {
38
39 //______________________________________________________________________
40 /**
41 * This implementation returns the name the threadgroup of the current
42 * thread.
43 *
44 * @param level the debug level for the given debug message.
45 * @param debug_message the debug message to be printed.
46 * @param debug_instance the debug object this message string belongs to.
47 * It can be used in the <code>getMessage</code>-method to retrieve
48 * additional information about what should be returned exactly.
49 */
50 public String getEvaluatedKeyword(String level,
51 String debug_message,
52 Debug debug_instance)
53 {
54 return(Thread.currentThread().getThreadGroup().getName());
55 }
56 }
57