public class CleanShutdownActivator
extends java.lang.Object
implements org.osgi.framework.BundleActivator, org.osgi.framework.ServiceListener
Modifier and Type | Field and Description |
---|---|
(package private) java.util.concurrent.CountDownLatch |
synchShutdown
Used to wait for stop.
|
(package private) SystemActivityNotificationsService |
sysActivityService
The system activity service.
|
Constructor and Description |
---|
CleanShutdownActivator() |
Modifier and Type | Method and Description |
---|---|
static SystemActivityNotificationsService |
getSystemActivityNotificationsService(org.osgi.framework.BundleContext context)
Gets a reference to a
SystemActivityNotificationsService
implementation currently registered in the bundle context. |
void |
serviceChanged(org.osgi.framework.ServiceEvent serviceEvent)
When new SystemActivityNotificationsService
is registered we add needed listeners.
|
void |
start(org.osgi.framework.BundleContext context)
Bundle activator start method.
|
void |
stop(org.osgi.framework.BundleContext context)
Called when this bundle is stopped so the Framework can perform the
bundle-specific activities necessary to stop the bundle.
|
final java.util.concurrent.CountDownLatch synchShutdown
SystemActivityNotificationsService sysActivityService
public void start(org.osgi.framework.BundleContext context) throws java.lang.Exception
start
in interface org.osgi.framework.BundleActivator
java.lang.Exception
- If this method throws an exception
(which won't happen).public void stop(org.osgi.framework.BundleContext context) throws java.lang.Exception
stop
in interface org.osgi.framework.BundleActivator
context
- The execution context of the bundle being stopped.java.lang.Exception
- If this method throws an exception, the bundle is
still marked as stopped, and the Framework will remove the bundle's
listeners, unregister all services registered by the bundle, and
release all services used by the bundle.public static SystemActivityNotificationsService getSystemActivityNotificationsService(org.osgi.framework.BundleContext context)
SystemActivityNotificationsService
implementation currently registered in the bundle context.
The returned reference to SystemActivityNotificationsService
is not being cached.
context
- the bundle context.SystemActivityNotificationsService
implementation currently registered in the bundle context.public void serviceChanged(org.osgi.framework.ServiceEvent serviceEvent)
serviceChanged
in interface org.osgi.framework.ServiceListener
serviceEvent
- ServiceEvent
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.