public final class ChameleonExecutor extends Object
| Modifier and Type | Field and Description |
|---|---|
private static String |
APPLICATION_BUNDLE |
private static ChameleonExecutor |
INSTANCE |
private File |
root |
| Modifier | Constructor and Description |
|---|---|
private |
ChameleonExecutor() |
| Modifier and Type | Method and Description |
|---|---|
org.osgi.framework.BundleContext |
context() |
static void |
deployApplication()
Builds and deploy the application bundle.
|
static org.osgi.framework.Bundle |
deployProbe()
Deploys the `probe` bundle, i.e.
|
private int |
getFactorAsAnInteger(String factor) |
InVivoRunner |
getInVivoRunnerInstance(Class<?> clazz)
Retrieves the InVivoRunner Factory and creates an instance.
|
static ChameleonExecutor |
instance(File root)
Gets the instance of Chameleon, i.e.
|
private static void |
setTimeFactory(int factor) |
private void |
start(File root)
Starts the underlying Chameleon instance.
|
private void |
stop()
Stops the underlying chameleon instance.
|
static void |
stopRunningInstance()
Stops the running Chameleon.
|
ChameleonExecutor |
waitForStability()
Waits for stability of the underlying frameworks.
|
private static final String APPLICATION_BUNDLE
private static ChameleonExecutor INSTANCE
private File root
public static ChameleonExecutor instance(File root) throws org.osgi.framework.BundleException, IOException
root - the base directory of the Chameleon.IOException - if the chameleon configuration cannot be read.org.osgi.framework.BundleException - if the chameleon cannot be started.public static void stopRunningInstance()
throws Exception
Exception - if the Chameleon instance cannot be stopped.private void start(File root) throws org.osgi.framework.BundleException, IOException
root - the base directory of the Chameleon.IOException - if the chameleon configuration cannot be read.org.osgi.framework.BundleException - if the chameleon cannot be started.private static void setTimeFactory(int factor)
private int getFactorAsAnInteger(String factor)
public org.osgi.framework.BundleContext context()
public ChameleonExecutor waitForStability()
private void stop()
throws Exception
Exception - if it cannot be stopped.public static org.osgi.framework.Bundle deployProbe()
throws org.osgi.framework.BundleException
Initially, this method was returning null. In the 0.7 version, it changes to Bundle. The
returned object is the installed bundle.
org.osgi.framework.BundleException - if the probe bundle cannot be started.public static void deployApplication()
throws org.osgi.framework.BundleException
org.osgi.framework.BundleExceptionpublic InVivoRunner getInVivoRunnerInstance(Class<?> clazz) throws org.junit.runners.model.InitializationError, ClassNotFoundException, IOException
clazz - the test classorg.junit.runners.model.InitializationErrorClassNotFoundExceptionIOExceptionCopyright © 2013–2015 Wisdom Framework. All rights reserved.