public final class FrameworkService extends Object implements org.osgi.framework.FrameworkListener
| Modifier and Type | Field and Description |
|---|---|
static String |
EVENT_TOPIC_LIFECYCLE |
static String |
EVENT_TYPE_CLUSTER_STARTED |
static String |
EVENT_TYPE_CLUSTERING_FEATURE_INSTALLED |
static String |
EVENT_TYPE_FILEINSTALL_STARTED |
static String |
EVENT_TYPE_FINAL_START_LEVEL_REACHED |
static String |
EVENT_TYPE_INITIAL_START_LEVEL_REACHED |
static String |
EVENT_TYPE_SPRING_BRIDGE_STARTED |
| Modifier and Type | Method and Description |
|---|---|
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. |
void |
notifyClusterStarted()
Notifies the service that the FileInstall watcher has been started and processed the found modules.
|
void |
notifyFileInstallStarted(List<Long> createdOnStartup)
Notifies the service that the FileInstall watcher has been started and processed the found modules.
|
void |
notifyFinalStartLevelReached()
Notifies the service that the Spring bridge has been started
|
void |
notifyInitialStartLevelReached()
Notifies the service that the Initial start leve has been reached
|
void |
notifySpringBridgeStarted()
Notifies the service that the Spring bridge has been started
|
void |
raiseStartLevel()
Raise the start level to its final state
|
static void |
sendEvent(String topic,
Map<String,?> properties,
boolean asynchronous)
Initiate synchronous or asynchronous delivery of an OSGi event using
EventAdmin service. |
void |
start()
Start framework
|
void |
stop()
Shuts the OSGi container down.
|
void |
waitForClusterStarted()
Wait for cluster sync to be finished
|
void |
waitForFileInstallStarted()
Wait for fileinstall
|
void |
waitForFinalStartLevelReached()
Wait for final start level to be reached
|
void |
waitForInitialStartLevelReached()
Wait for initial start level to be reached
|
void |
waitForSpringBridgeStarted()
Wait for Spring bridge to be started
|
public static final String EVENT_TOPIC_LIFECYCLE
public static final String EVENT_TYPE_CLUSTERING_FEATURE_INSTALLED
public static final String EVENT_TYPE_INITIAL_START_LEVEL_REACHED
public static final String EVENT_TYPE_FILEINSTALL_STARTED
public static final String EVENT_TYPE_SPRING_BRIDGE_STARTED
public static final String EVENT_TYPE_CLUSTER_STARTED
public static final String EVENT_TYPE_FINAL_START_LEVEL_REACHED
public static org.osgi.framework.BundleContext getBundleContext()
null in case the OSGi container has not been started yetpublic static FrameworkService getInstance()
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 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 errorpublic void frameworkEvent(org.osgi.framework.FrameworkEvent event)
frameworkEvent in interface org.osgi.framework.FrameworkListenerpublic void notifyInitialStartLevelReached()
public void waitForInitialStartLevelReached()
public void notifyFileInstallStarted(List<Long> createdOnStartup)
createdOnStartup - List of bundles that have installed by fileinstallpublic void waitForFileInstallStarted()
public void notifySpringBridgeStarted()
public void waitForSpringBridgeStarted()
public void raiseStartLevel()
public void notifyFinalStartLevelReached()
public void waitForFinalStartLevelReached()
public void notifyClusterStarted()
public void waitForClusterStarted()
Copyright © 2004–2021 Jahia Solutions Group SA. All rights reserved.