01: /*
02:
03: This software is OSI Certified Open Source Software.
04: OSI Certified is a certification mark of the Open Source Initiative.
05:
06: The license (Mozilla version 1.0) can be read at the MMBase site.
07: See http://www.MMBase.org/license
08:
09: */
10:
11: package org.mmbase.bridge;
12:
13: import org.mmbase.bridge.implementation.BasicCloudContext;
14:
15: /**
16: * The collection of clouds, and modules within a Java Virtual Machine.
17: *
18: * @author Rob Vermeulen
19: * @author Pierre van Rooden
20: * @version $Id: LocalContext.java,v 1.6 2006/11/11 19:26:03 michiel Exp $
21: */
22: public final class LocalContext extends BasicCloudContext {
23:
24: private static LocalContext this Context;
25:
26: /**
27: * Constructor to call from the MMBase class
28: * (private, so cannot be reached from a script)
29: */
30: private LocalContext() {
31: super ();
32: }
33:
34: /**
35: * Called from the script to retrieve the current CloudContext
36: * @return current CloudContext
37: */
38: public static LocalContext getCloudContext() {
39: if (this Context == null)
40: this Context = new LocalContext();
41: return thisContext;
42: }
43:
44: }
|