org.mmbase.bridge
Class ContextProvider

java.lang.Object
  extended byorg.mmbase.bridge.ContextProvider

public class ContextProvider
extends java.lang.Object

Main class to aquire CloudContexts

Since:
MMBase-1.5
Version:
$Id: ContextProvider.java,v 1.8 2004/02/24 12:05:37 michiel Exp $
Author:
Kees Jongenburger

Field Summary
static java.lang.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"
 
Constructor Summary
ContextProvider()
           
 
Method Summary
static CloudContext getCloudContext(java.lang.String uri)
          Factory method to get an instance of a CloudContext.
static CloudContext getDefaultCloudContext()
           
static java.lang.String getDefaultCloudContextName()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_CLOUD_CONTEXT_NAME

public static final java.lang.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
Constructor Detail

ContextProvider

public ContextProvider()
Method Detail

getCloudContext

public static CloudContext getCloudContext(java.lang.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 java.lang.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
Since:
MMBase-1.7


MMBase build 1.7.1.20041002