KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > picocontainer > defaults > NullComponentMonitor


1 /*****************************************************************************
2  * Copyright (C) PicoContainer Organization. All rights reserved. *
3  * ------------------------------------------------------------------------- *
4  * The software in this package is published under the terms of the BSD *
5  * style license a copy of which has been included with this distribution in *
6  * the LICENSE.txt file. *
7  * *
8  * Original code by Paul Hammant & Obie Fernandez & Aslak *
9  *****************************************************************************/

10
11 package org.picocontainer.defaults;
12
13 import java.io.Serializable JavaDoc;
14 import java.lang.reflect.Constructor JavaDoc;
15 import java.lang.reflect.Method JavaDoc;
16
17 /**
18  * @author Paul Hammant & Obie Fernandez
19  * @version $Revision: 1840 $
20  */

21 public class NullComponentMonitor implements ComponentMonitor, Serializable JavaDoc {
22     private static NullComponentMonitor instance;
23
24     public void instantiating(Constructor JavaDoc constructor) {
25     }
26
27     public void instantiated(Constructor JavaDoc constructor, long beforeTime, long duration) {
28     }
29
30     public void instantiationFailed(Constructor JavaDoc constructor, Exception JavaDoc e) {
31     }
32
33     public void invoking(Method JavaDoc method, Object JavaDoc instance) {
34     }
35
36     public void invoked(Method JavaDoc method, Object JavaDoc instance, long duration) {
37     }
38
39     public void invocationFailed(Method JavaDoc method, Object JavaDoc instance, Exception JavaDoc e) {
40     }
41
42     public static synchronized NullComponentMonitor getInstance() {
43         if (instance == null) {
44             instance = new NullComponentMonitor();
45         }
46         return instance;
47     }
48 }
49
Popular Tags