Package org.nuxeo.osgi.application
Class StandaloneApplication
- java.lang.Object
-
- org.nuxeo.osgi.OSGiAdapter
-
- org.nuxeo.osgi.application.StandaloneApplication
-
public class StandaloneApplication extends OSGiAdapter
- Author:
- Bogdan Stefanescu
-
-
Field Summary
Fields Modifier and Type Field Description protected SharedClassLoader
classLoader
protected List<File>
classPath
protected Environment
env
protected File
home
protected boolean
isStarted
protected String[]
libdirs
static String
MAIN_TASK
protected boolean
scanForNestedJARs
-
Fields inherited from class org.nuxeo.osgi.OSGiAdapter
bundleIds, bundleListeners, dataDir, frameworkListeners, idTableFile, properties, registry, serviceListeners, services, systemBundle, workingDir
-
-
Method Summary
-
Methods inherited from class org.nuxeo.osgi.OSGiAdapter
addBundleListener, addFrameworkListener, addServiceListener, addServiceListener, fireBundleEvent, fireFrameworkEvent, fireServiceEvent, getBundle, getBundleId, getDataDir, getInstalledBundles, getProperty, getProperty, getRegistry, getSystemBundle, getWorkingDir, initialize, install, removeBundleListener, removeFrameworkListener, removeService, removeServiceListener, setProperty, setSystemBundle, uninstall
-
-
-
-
Field Detail
-
MAIN_TASK
public static final String MAIN_TASK
- See Also:
- Constant Field Values
-
classLoader
protected final SharedClassLoader classLoader
-
env
protected final Environment env
-
isStarted
protected boolean isStarted
-
home
protected File home
-
scanForNestedJARs
protected boolean scanForNestedJARs
-
libdirs
protected String[] libdirs
-
-
Method Detail
-
getInstance
public static StandaloneApplication getInstance()
-
createInstance
public static StandaloneApplication createInstance(SharedClassLoader cl) throws IOException
- Throws:
IOException
-
getSharedClassLoader
public SharedClassLoader getSharedClassLoader()
-
getEnvironment
public Environment getEnvironment()
-
start
public void start() throws IOException, org.osgi.framework.BundleException
- Throws:
IOException
org.osgi.framework.BundleException
-
isStarted
public boolean isStarted()
-
shutdown
public void shutdown() throws IOException
- Overrides:
shutdown
in classOSGiAdapter
- Throws:
IOException
-
startBundles
protected void startBundles(List<BundleFile> bundles) throws org.osgi.framework.BundleException
- Throws:
org.osgi.framework.BundleException
-
loadUserBundles
protected List<BundleFile> loadUserBundles(String key) throws IOException
- Throws:
IOException
-
autoInstallBundles
protected void autoInstallBundles() throws IOException, org.osgi.framework.BundleException
- Throws:
IOException
org.osgi.framework.BundleException
-
install
public void install(BundleFile bf) throws org.osgi.framework.BundleException
- Throws:
org.osgi.framework.BundleException
-
installAll
public void installAll(List<BundleFile> bundles) throws org.osgi.framework.BundleException
- Throws:
org.osgi.framework.BundleException
-
createSystemBundle
public static BundleFile createSystemBundle(URL systemBundle) throws IOException
Creates the system bundle from the jar specified by the nuxeo.osgi.system.bundle property.- Throws:
IOException
-
getComandLineOptions
public static CommandLineOptions getComandLineOptions()
-
hasCommandLineOption
public static boolean hasCommandLineOption(String option)
-
createEnvironment
public static Environment createEnvironment() throws IOException
- Throws:
IOException
-
setMainTask
public static void setMainTask(Runnable mainTask)
-
getMainTask
public static Runnable getMainTask()
-
-