Package org.talend.transform.runtime.api

# Class RuntimeFactory

java.lang.Object
org.talend.transform.runtime.api.RuntimeFactory

public class RuntimeFactory extends Object
A factory that returns a RuntimeEngine object. This is used only for the API.

## Field Summary

Fields
Modifier and Type
Field
Description
`protected static RuntimeEngine`
`_blueprintRuntime`
`protected static String`
`_blueprintSyncObject`
`protected static SoftReference`
`_currentRuntime`
`protected static Class`
`_eclipseStarterClass`
`protected static int`
`_runtimeUses`
`protected static final String`
`ADAPTOR`
`protected static final String`
`FRAMEWORK_BUNDLE_NAME`
`protected static final String`
`FRAMEWORK_SHAPE_FOLDER`
`protected static final String`
`FRAMEWORK_UTIL`
`static final String`
`JAVA_IO_TMPDIR`
`static final String`
`ODT_DEV_INSTALL_VAR`
The development installation, used for finding plugin projects.
`static final String`
`ODT_DEV_WORKSPACE_VAR`
The development workspace to look at for finding projects under development or to write sample data to.
`static final String`
`ODT_LICENSE_DIR`
`static final String`
`OSDT_DEBUG`
`static final String`
`OSDT_EDITION`
`static final String`
`OSDT_FORCE_TEMP_INSTALL`
For internal use only.
`static final String`
`OSDT_HOME_VAR`
`static final String`
`OSDT_INIT_DEBUG`
`static final String`
`OSDT_INIT_LOGGING_CONTENT`
`static final String`
`OSDT_INIT_LOGGING_DEST`
`static final String`
`OSDT_INSTALL_DIR`
`static final String`
`OSDT_OSGI_PARENTCLASSLOADER`
`static final String`
`OSDT_RESET_WORKSPACE`
`static final String`
`OSDT_TEMP_DIRECTORY`
`static final String`
`OSDT_TEMP_WORKSPACE_DIR`
`static final String`
`OSDT_TEST_INSTALL_AREA`
`static final String`
`OSGI_ADAPTOR`
`protected static final String`
`OSGI_CONFIGURATION_AREA`
`static final String`
`OSGI_DEV`
`protected static final String`
`OSGI_FRAMEWORK`
`protected static final String`
`OSGI_FRAMEWORK_SHAPE`
`static final String`
`OSGI_INSTALL_AREA`
`static final String`
`OSGI_INSTANCE_AREA`
`static final String`
`RUNTIME_API_PLUGIN_ID`
`protected static final String`
`STARTER`

## Constructor Summary

Constructors
Constructor
Description
`RuntimeFactory()`

## Method Summary

Modifier and Type
Method
Description
`static void`
`bundleShutdown()`
`static int`
`closeRuntime()`
For internal use only.
`static int`
`countdownCloseRuntime(RuntimeEngine runtime)`
If runtime is not stopped already, countdown and if zero is reached (meaning no one is using this runtime) proceed with actual shutdown.
`static RuntimeEngine`
`createRuntime()`
Create a new RuntimeEngine object, using the default repository location.
`static RuntimeEngine`
`createRuntime(int options)`
For internal use only.
`protected static RuntimeEngine`
`createRuntime(String application, String[] args, int options)`
`protected static RuntimeEngine`
`findRuntimeOnClasspath()`
`protected static RuntimeEngine`
`findRuntimeOnClasspath(ClassLoader cl)`
`protected static Class`
`getEclipseStarterClass()`
`static RuntimeEngine`
`getRuntime()`
`RuntimeEngine`
`getRuntimeBlueprint()`
`static int`
`getRuntimeUses()`
For internal use only.
`static boolean`
`inOsgi()`
`static void`
`main(String[] args)`
Used to start command line editor or runtime.
`static void`
`reset()`
For internal use only.
`void`
`run()`
`static void`
`setInitialLogging(String content, String dest)`
Sets the logging to be used when starting the runtime.
`static void`
`setRuntime(RuntimeEngine runtime)`
`void`
`setRuntimeBlueprint(RuntimeEngine runtime)`
`static void`
`shutdownEclipse()`
For internal use only.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### RUNTIME_API_PLUGIN_ID

public static final String RUNTIME_API_PLUGIN_ID

See Also:
  - Constant Field Values

### OSDT_RESET_WORKSPACE

public static final String OSDT_RESET_WORKSPACE

See Also:
  - Constant Field Values

### OSDT_DEBUG

public static final String OSDT_DEBUG

See Also:
  - Constant Field Values

### ODT_DEV_WORKSPACE_VAR

public static final String ODT_DEV_WORKSPACE_VAR
The development workspace to look at for finding projects under development or to write sample data to. This can be a URL with the `file` scheme or can be a file path.

See Also:
  - Constant Field Values

### ODT_DEV_INSTALL_VAR

public static final String ODT_DEV_INSTALL_VAR
The development installation, used for finding plugin projects. This can be a URL with the `file` scheme or can be a file path.

See Also:
  - Constant Field Values

### OSDT_HOME_VAR

public static final String OSDT_HOME_VAR

See Also:
  - Constant Field Values

### OSDT_EDITION

public static final String OSDT_EDITION

See Also:
  - Constant Field Values

### ODT_LICENSE_DIR

public static final String ODT_LICENSE_DIR

See Also:
  - Constant Field Values

### OSDT_FORCE_TEMP_INSTALL

public static final String OSDT_FORCE_TEMP_INSTALL
For internal use only.

See Also:
  - Constant Field Values

### OSDT_INSTALL_DIR

public static final String OSDT_INSTALL_DIR

See Also:
  - Constant Field Values

### OSDT_TEMP_DIRECTORY

public static final String OSDT_TEMP_DIRECTORY

See Also:
  - Constant Field Values

### OSDT_TEMP_WORKSPACE_DIR

public static final String OSDT_TEMP_WORKSPACE_DIR

See Also:
  - Constant Field Values

### JAVA_IO_TMPDIR

public static final String JAVA_IO_TMPDIR

See Also:
  - Constant Field Values

### OSDT_TEST_INSTALL_AREA

public static final String OSDT_TEST_INSTALL_AREA

See Also:
  - Constant Field Values

### OSDT_INIT_LOGGING_CONTENT

public static final String OSDT_INIT_LOGGING_CONTENT

See Also:
  - Constant Field Values

### OSDT_INIT_LOGGING_DEST

public static final String OSDT_INIT_LOGGING_DEST

See Also:
  - Constant Field Values

### OSDT_OSGI_PARENTCLASSLOADER

public static final String OSDT_OSGI_PARENTCLASSLOADER

See Also:
  - Constant Field Values

### OSDT_INIT_DEBUG

public static final String OSDT_INIT_DEBUG

See Also:
  - Constant Field Values

### _runtimeUses

protected static int _runtimeUses

### _currentRuntime

protected static SoftReference _currentRuntime

### _blueprintRuntime

protected static RuntimeEngine _blueprintRuntime

### _blueprintSyncObject

protected static String _blueprintSyncObject

### _eclipseStarterClass

protected static Class _eclipseStarterClass

### FRAMEWORK_BUNDLE_NAME

protected static final String FRAMEWORK_BUNDLE_NAME

See Also:
  - Constant Field Values

### OSGI_FRAMEWORK

protected static final String OSGI_FRAMEWORK

See Also:
  - Constant Field Values

### OSGI_FRAMEWORK_SHAPE

protected static final String OSGI_FRAMEWORK_SHAPE

See Also:
  - Constant Field Values

### FRAMEWORK_SHAPE_FOLDER

protected static final String FRAMEWORK_SHAPE_FOLDER

See Also:
  - Constant Field Values

### STARTER

protected static final String STARTER

See Also:
  - Constant Field Values

### ADAPTOR

protected static final String ADAPTOR

See Also:
  - Constant Field Values

### FRAMEWORK_UTIL

protected static final String FRAMEWORK_UTIL

See Also:
  - Constant Field Values

### OSGI_DEV

public static final String OSGI_DEV

See Also:
  - Constant Field Values

### OSGI_INSTANCE_AREA

public static final String OSGI_INSTANCE_AREA

See Also:
  - Constant Field Values

### OSGI_CONFIGURATION_AREA

protected static final String OSGI_CONFIGURATION_AREA

See Also:
  - Constant Field Values

### OSGI_INSTALL_AREA

public static final String OSGI_INSTALL_AREA

See Also:
  - Constant Field Values

### OSGI_ADAPTOR

public static final String OSGI_ADAPTOR

See Also:
  - Constant Field Values

## Constructor Details

### RuntimeFactory

public RuntimeFactory()

## Method Details

### setInitialLogging

public static void setInitialLogging(String content, String dest)
Sets the logging to be used when starting the runtime.

Parameters:
  `content` - - specify "all"
  `dest` - - specify either "console" or "file"

### getRuntime

public static RuntimeEngine getRuntime()

### setRuntime

public static void setRuntime(RuntimeEngine runtime)

### getRuntimeBlueprint

public RuntimeEngine getRuntimeBlueprint()

### setRuntimeBlueprint

public void setRuntimeBlueprint(RuntimeEngine runtime)

### run

public void run() throws Exception

Throws:
  `Exception`

### createRuntime

public static RuntimeEngine createRuntime()
Create a new RuntimeEngine object, using the default repository location.

Returns:
  a RuntimeEngine

### createRuntime

public static RuntimeEngine createRuntime(int options)
For internal use only.

### shutdownEclipse

public static void shutdownEclipse()
For internal use only.

### reset

public static void reset()
For internal use only.

### countdownCloseRuntime

public static int countdownCloseRuntime(RuntimeEngine runtime)
If runtime is not stopped already, countdown and if zero is reached (meaning no one is using this runtime) proceed with actual shutdown.

Parameters:
  `runtime` -
Returns:

### closeRuntime

public static int closeRuntime()
For internal use only.

### getRuntimeUses

public static int getRuntimeUses()
For internal use only.

### bundleShutdown

public static void bundleShutdown()

### getEclipseStarterClass

protected static Class getEclipseStarterClass() throws ClassNotFoundException

Throws:
  `ClassNotFoundException`

### findRuntimeOnClasspath

protected static RuntimeEngine findRuntimeOnClasspath(ClassLoader cl)

### findRuntimeOnClasspath

protected static RuntimeEngine findRuntimeOnClasspath()

### inOsgi

public static boolean inOsgi()

### createRuntime

protected static RuntimeEngine createRuntime(String application, String[] args, int options)

### main

public static void main(String[] args)
Used to start command line editor or runtime.

Parameters:
  `args` -