public class FrameworkService extends Object implements org.osgi.framework.FrameworkListener
| Modifier and Type | Field and Description |
|---|---|
static String |
EVENT_TOPIC_LIFECYCLE |
static String |
EVENT_TYPE_CLUSTERING_FEATURE_INSTALLED |
static String |
EVENT_TYPE_OSGI_STARTED |
| Modifier and Type | Method and Description |
|---|---|
protected void |
destroyTimer() |
void |
frameworkEvent(org.osgi.framework.FrameworkEvent event) |
static org.osgi.framework.BundleContext |
getBundleContext()
Returns bundle context.
|
static FrameworkService |
getInstance()
Returns a singleton instance of this class.
|
boolean |
isFirstStartup()
Returns
true if this is the first startup of the OSGi container |
boolean |
isStarted()
Returns
true if the OSGi container is completely started. |
static void |
notifyFileInstallStarted(List<Long> createdOnStartup)
Notifies the service that the FileInstall watcher has been started and processed the found modules.
|
static void |
sendEvent(String topic,
Map<String,?> properties,
boolean asynchronous)
Initiate synchronous or asynchronous delivery of an OSGi event using
EventAdmin service. |
void |
start() |
void |
stop()
Shuts the OSGi container down.
|
public static final String EVENT_TOPIC_LIFECYCLE
public static final String EVENT_TYPE_CLUSTERING_FEATURE_INSTALLED
public static final String EVENT_TYPE_OSGI_STARTED
public static org.osgi.framework.BundleContext getBundleContext()
null in case the OSGi container has not been started yetpublic static FrameworkService getInstance()
public static void notifyFileInstallStarted(List<Long> createdOnStartup)
public static void sendEvent(String topic, Map<String,?> properties, boolean asynchronous)
EventAdmin service. If synchronous delivery is
requested, this method does not return to the caller until delivery of the event is completed.topic - the topic of the eventproperties - the event's properties (may be null). A property whose key is not of type String will be ignored.asynchronous - if true an event is delivered asynchronously; in case of false this method does not
return to the caller until delivery of the event is completedpublic void frameworkEvent(org.osgi.framework.FrameworkEvent event)
frameworkEvent in interface org.osgi.framework.FrameworkListenerpublic boolean isStarted()
true if the OSGi container is completely started.true if the OSGi container is completely started; false otherwisepublic boolean isFirstStartup()
true if this is the first startup of the OSGi containertrue if this is the first startup of the OSGi containerpublic void start()
public void stop()
throws org.osgi.framework.BundleException
org.osgi.framework.BundleException - in case of an errorprotected void destroyTimer()
Copyright © 2004–2020 Jahia Solutions Group SA. All rights reserved.