KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > corba > util > LocalObjectBase


1 /*====================================================================
2
3 OpenCCM: The Open CORBA Component Model Platform
4 Copyright (C) 2000-2004 INRIA & USTL - LIFL - GOAL
5 Contact: openccm@objectweb.org
6
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation; either
10 version 2.1 of the License, or any later version.
11
12 This library 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 GNU
15 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 library; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
20 USA
21
22 Initial developer(s): Philippe Merle.
23 Contributor(s): ______________________________________.
24
25 ====================================================================*/

26
27 package org.objectweb.corba.util;
28
29 /**
30  * LocalObjectBase is the base class for all classes
31  * implementing some OMG IDL local interfaces.
32  *
33  * Features:
34  *
35  * - hiding the required CORBA::LocalObject inheritance.
36  * - providing technical logging capabilities.
37  *
38  * @author <a HREF="mailto:Philippe.Merle@lifl.fr">Philippe Merle</a>
39  *
40  * @version 0.1
41  */

42
43 public class LocalObjectBase
44      extends org.omg.CORBA.LocalObject JavaDoc
45 {
46     // ==================================================================
47
//
48
// Internal state.
49
//
50
// ==================================================================
51

52     /**
53      * Currently, only one global logger.
54      *
55      * TODO: One logger by classes and/or package.
56      */

57     protected static Logger globalLogger_ = new BasicLoggerImpl();
58
59     // ==================================================================
60
//
61
// Constructor.
62
//
63
// ==================================================================
64

65     /** The default constructor. */
66     public
67     LocalObjectBase()
68     {
69     // Logs the instantiation.
70
getLogger().trace(this, "INSTANTIATION");
71     }
72
73     // ==================================================================
74
//
75
// Internal methods.
76
//
77
// ==================================================================
78

79     /**
80      * Obtains the associated logger.
81      */

82     protected Logger
83     getLogger()
84     {
85         return globalLogger_;
86     }
87
88     // ==================================================================
89
//
90
// Public methods for java.lang.Object
91
//
92
// ==================================================================
93

94     /**
95      * Finalization of the object.
96      */

97     public void
98     finalize()
99     {
100     // Logs the finalization.
101
getLogger().trace(this, "FINALIZATION");
102     }
103
104     // ==================================================================
105
//
106
// Public methods.
107
//
108
// ==================================================================
109
}
110
Popular Tags