|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.java.sip.communicator.impl.shutdowntimeout.ShutdownTimeout
public class ShutdownTimeout
In order to shut down SIP Communicator we kill the Felix system bundle. However, this sometimes doesn't work for reason of running non-daemon threads (such as the javasound event dispatcher). This results in having instances of SIP Communicator running in the background. We use this shutdown timout bundle in order to fix this problem. When our stop method is called, we assume that a shutdown is executed and start a 15 seconds daemon thread. If the application is still running once these 15 seconds expire, we System.exit() the application.
| Field Summary | |
|---|---|
static long |
SHUTDOWN_TIMEOUT
The number of miliseconds that we wait before we force a shutdown. |
static int |
SYSTEM_EXIT_CODE
The code that we exit with if the application is not down in 15 seconds. |
| Constructor Summary | |
|---|---|
ShutdownTimeout()
|
|
| Method Summary | |
|---|---|
void |
start(org.osgi.framework.BundleContext context)
Dummy impl of the 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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final long SHUTDOWN_TIMEOUT
public static final int SYSTEM_EXIT_CODE
| Constructor Detail |
|---|
public ShutdownTimeout()
| Method Detail |
|---|
public void start(org.osgi.framework.BundleContext context)
throws Exception
start in interface org.osgi.framework.BundleActivatorcontext - unused
Exception - If this method throws an exception
(which won't happen).
public void stop(org.osgi.framework.BundleContext context)
throws Exception
stop in interface org.osgi.framework.BundleActivatorcontext - The execution context of the bundle being stopped.
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.
|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||