KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javolution > lang > Reference


1 /*
2  * Javolution - Java(TM) Solution for Real-Time and Embedded Systems
3  * Copyright (C) 2006 - Javolution (http://javolution.org/)
4  * All rights reserved.
5  *
6  * Permission to use, copy, modify, and distribute this software is
7  * freely granted, provided that this notice is preserved.
8  */

9 package javolution.lang;
10
11
12
13 /**
14  * <p> This interface represents an object reference, the reachability level
15  * of a reference varies based on the actual reference implementation.
16  * Here are the reachability levels for some of <i><b>J</b>avolution</i>
17  * references:<ul>
18  * <li> {@link javolution.context.PersistentContext.Reference PersistentContext.Reference} :
19  * Reachable accross multiple program executions.</li>
20  * <li> {@link javolution.context.LocalContext.Reference LocalContext.Reference} :
21  * Reachable only within the scope of the
22  * {@link javolution.context.LocalContext LocalContext}
23  * where it has been set.</li>
24  * <li> {@link javolution.context.PoolContext.Reference PoolContext.Reference} :
25  * Reachable only within the scope of the
26  * {@link javolution.context.PoolContext PoolContext}
27  * where it has been created (factory produced).</li>
28  * </ul></p>
29  *
30  * @author <a HREF="mailto:jean-marie@dautelle.com">Jean-Marie Dautelle</a>
31  * @version 3.3, May 10, 2005
32  */

33 public interface Reference/*<T>*/ {
34
35     /**
36      * Returns the value this reference referes to.
37      *
38      * @return the referent or <code>null</code> if not set.
39      */

40     Object JavaDoc/*{T}*/ get();
41
42     /**
43      * Sets the value this reference referes to.
44      *
45      * @param value the reference value.
46      */

47     void set(Object JavaDoc/*{T}*/ value);
48
49 }
Popular Tags