org.mmbase.bridge
Class ContextProvider
java.lang.Object
org.mmbase.bridge.ContextProvider
- public class ContextProvider
- extends Object
Main class to aquire CloudContexts
- Since:
- MMBase-1.5
- Version:
- $Id: ContextProvider.java,v 1.10 2005/11/04 23:20:25 michiel Exp $
- Author:
- Kees Jongenburger
|
Field Summary |
static String |
DEFAULT_CLOUD_CONTEXT_NAME
When no system property mmbase.defaultcloudcontext is set
the default cloud context is the context returned when
DEFAULT_CLOUD_CONTEXT_NAME is fed to getCloudContext(String)
DEFAULT_CLOUD_CONTEXT_NAME="local" |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_CLOUD_CONTEXT_NAME
public static final String DEFAULT_CLOUD_CONTEXT_NAME
- When no system property mmbase.defaultcloudcontext is set
the default cloud context is the context returned when
DEFAULT_CLOUD_CONTEXT_NAME is fed to getCloudContext(String)
DEFAULT_CLOUD_CONTEXT_NAME="local"
- See Also:
- Constant Field Values
ContextProvider
public ContextProvider()
getCloudContext
public static CloudContext getCloudContext(String uri)
- Factory method to get an instance of a CloudContext. Depending
on the uri parameter given the CloudContext might be a local context
or a remote context (rmi)
- Parameters:
uri - an identifier for the context
possible values:
- local : will return a local context
- rmi://hostname:port/contextname : will return a remote context
- a null parameter: will return the default context
- Returns:
- a cloud context
- Throws:
BridgeException - if the cloudcontext was not found
getDefaultCloudContextName
public static String getDefaultCloudContextName()
- Returns:
- the name of the cloud context to be used as default
- Since:
- MMBase-1.7
getDefaultCloudContext
public static CloudContext getDefaultCloudContext()
- Returns:
- the default cloud context This is the local cloud if mmbase is running or could be started (with mmbase.config system property),
Otherwise a default rmmci cloud, or specified with mmbase.defaultcloudtext.property
- Since:
- MMBase-1.7
MMBase build 1.8.1.20060716