Tuscany Core

org.apache.tuscany.core.client
Class TuscanyRuntime

java.lang.Object
  extended by org.osoa.sca.SCA
      extended by org.apache.tuscany.core.client.TuscanyRuntime

public class TuscanyRuntime
extends org.osoa.sca.SCA

Create and initialize a Tuscany SCA runtime environment.

Version:
$Rev: 405621 $ $Date: 2006-05-09 23:55:24 -0400 (Tue, 09 May 2006) $

Nested Class Summary
static interface TuscanyRuntime.Monitor
          Monitor interface for a TuscanyRuntime.
 
Constructor Summary
TuscanyRuntime(java.lang.String name, java.lang.String uri)
          Construct a runtime using a null MonitorFactory.
TuscanyRuntime(java.lang.String name, java.lang.String uri, org.apache.tuscany.common.monitor.MonitorFactory monitorFactory)
          Construct a runtime containing a single module component with the specified name.
 
Method Summary
 void shutdown()
          Shut down the Tuscany runtime.
 void start()
          Start the runtime and associate the module context with the calling thread.
 void stop()
          Disassociate the module context from the current thread and shut down the runtime.
 
Methods inherited from class org.osoa.sca.SCA
setModuleContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TuscanyRuntime

public TuscanyRuntime(java.lang.String name,
                      java.lang.String uri)
               throws ConfigurationException
Construct a runtime using a null MonitorFactory.

Parameters:
name - the name of the module component
uri - the URI to assign to the module component
Throws:
ConfigurationException - if there was a problem loading the SCA configuration
See Also:
TuscanyRuntime(String, String, org.apache.tuscany.common.monitor.MonitorFactory)

TuscanyRuntime

public TuscanyRuntime(java.lang.String name,
                      java.lang.String uri,
                      org.apache.tuscany.common.monitor.MonitorFactory monitorFactory)
               throws ConfigurationException
Construct a runtime containing a single module component with the specified name. The module definition is loaded from a "/sca.module" resource found on the classpath of the current Thread context classloader.

Parameters:
name - the name of the module component
uri - the URI to assign to the module component
monitorFactory - the MonitorFactory for this runtime
Throws:
ConfigurationException - if there was a problem loading the SCA configuration
Method Detail

start

public void start()
Start the runtime and associate the module context with the calling thread.

Specified by:
start in class org.osoa.sca.SCA

stop

public void stop()
Disassociate the module context from the current thread and shut down the runtime.

Specified by:
stop in class org.osoa.sca.SCA

shutdown

public void shutdown()
Shut down the Tuscany runtime.


Tuscany Core

-