KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > picocontainer > gems > adapters > ThreadLocalReference


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 Joerg Schaible *
9  *****************************************************************************/

10
11 package org.picocontainer.gems.adapters;
12
13 import org.picocontainer.defaults.ObjectReference;
14
15 import java.io.ObjectInputStream JavaDoc;
16 import java.io.ObjectOutputStream JavaDoc;
17 import java.io.Serializable JavaDoc;
18
19
20 /**
21  * An {@link org.picocontainer.defaults.ObjectReference} based on a {@link ThreadLocal}.
22  *
23  * @author Jörg Schaible
24  */

25 public class ThreadLocalReference extends ThreadLocal JavaDoc implements ObjectReference, Serializable JavaDoc {
26
27     private static final long serialVersionUID = 1L;
28
29     private void writeObject(final ObjectOutputStream JavaDoc out) {
30         if(out != null); // eliminate warning because of unused parameter
31
}
32
33     private void readObject(final ObjectInputStream JavaDoc in) {
34         if(in != null); // eliminate warning because of unused parameter
35
}
36 }
37
Popular Tags