public final class Activator extends ExtendedPlugin
Activator
class controls the plug-in life cycle.
Warning: Users should not explicitly instantiate this class.
Modifier and Type | Class and Description |
---|---|
static class |
Activator.Startup
Plug-in early startup.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PLUGIN_ID
The plug-in identifier.
|
console
Constructor and Description |
---|
Activator()
The constructor.
|
Modifier and Type | Method and Description |
---|---|
static void |
awaitServices(long timeout,
java.util.concurrent.TimeUnit unit)
Waits blocking until all supplied extensions
are processed, core services loaded and started.
|
static void |
awaitServices(TimeValue timeout) |
static ClassResolver |
classResolver()
Returns primary
ClassResolver utility to resolve unknown classes. |
static java.util.List<org.osgi.framework.Bundle> |
contributingBundles()
Returns a list of bundles contributing extensions to this plug-in.
|
static PluginConsole |
defaultConsole()
Gets the shared console.
|
static Activator |
defaultInstance()
Gets the shared instance.
|
static java.util.Set<java.lang.String> |
extensionContributors()
Returns a set of extension contributors to this plug-in.
|
static boolean |
loadedServices()
Determines whether all supplied extensions
are processed, core services loaded and started.
|
static void |
loadServices(java.lang.Runnable hook,
long timeout,
java.util.concurrent.TimeUnit unit)
Processes supplied extensions, loads and starts core services.
|
static void |
loadServices(java.lang.Runnable hook,
TimeValue timeout) |
void |
start(org.osgi.framework.BundleContext context)
Starts this plug-in.
|
void |
stop(org.osgi.framework.BundleContext context)
Stops this plug-in.
|
static void |
unloadServices(java.lang.Runnable hook,
long timeout,
java.util.concurrent.TimeUnit unit)
Processes supplied extensions, stops and unloads core services.
|
static void |
unloadServices(java.lang.Runnable hook,
TimeValue timeout) |
getConsole
find, find, getBundle, getDescriptor, getLog, getPluginPreferences, getStateLocation, initializeDefaultPluginPreferences, internalInitializeDefaultPluginPreferences, isDebugging, openStream, openStream, savePluginPreferences, setDebugging, shutdown, startup, toString
public static final java.lang.String PLUGIN_ID
public static Activator defaultInstance()
null
public static PluginConsole defaultConsole()
null
public static java.util.Set<java.lang.String> extensionContributors()
public static java.util.List<org.osgi.framework.Bundle> contributingBundles()
public static ClassResolver classResolver()
ClassResolver
utility to resolve unknown classes.public static void loadServices(java.lang.Runnable hook, long timeout, java.util.concurrent.TimeUnit unit) throws java.util.concurrent.TimeoutException
action
- executed after services load prior to start, not null
timeout
- the maximum time to loadunit
- the time unit of the timeout argumentjava.lang.RuntimeException
- if an error occurredjava.util.concurrent.TimeoutException
- if the load timed outpublic static void loadServices(java.lang.Runnable hook, TimeValue timeout) throws java.util.concurrent.TimeoutException
java.util.concurrent.TimeoutException
public static void unloadServices(java.lang.Runnable hook, long timeout, java.util.concurrent.TimeUnit unit) throws java.util.concurrent.TimeoutException
action
- executed after services stop prior to unload, not null
timeout
- the maximum time to unloadunit
- the time unit of the timeout argumentjava.lang.RuntimeException
- if an error occurredjava.util.concurrent.TimeoutException
- if the unload timed outpublic static void unloadServices(java.lang.Runnable hook, TimeValue timeout) throws java.util.concurrent.TimeoutException
java.util.concurrent.TimeoutException
public static boolean loadedServices()
public static void awaitServices(long timeout, java.util.concurrent.TimeUnit unit) throws java.util.concurrent.TimeoutException
timeout
- the maximum time to waitunit
- the time unit of the timeout argumentjava.util.concurrent.TimeoutException
- if the wait timed outpublic static void awaitServices(TimeValue timeout) throws java.util.concurrent.TimeoutException
java.util.concurrent.TimeoutException
public void start(org.osgi.framework.BundleContext context) throws java.lang.Exception
Warning: Users must never explicitly call this method.
start
in interface org.osgi.framework.BundleActivator
start
in class org.eclipse.core.runtime.Plugin
java.lang.Exception
public void stop(org.osgi.framework.BundleContext context) throws java.lang.Exception
Warning: Users must never explicitly call this method.
stop
in interface org.osgi.framework.BundleActivator
stop
in class org.eclipse.core.runtime.Plugin
java.lang.Exception