public abstract class AbstractClientApplication extends AbstractApplication implements ClientApplication
This is a convenient parent class for ClientApplication
developers. It extends AbstractApplication
and implements Runnable
to wait for shutdown()
to be called. When using this class, you implement
Application.start()
(and optionally AbstractApplication.stop()
), and provide a reference to it to whatever component is responsible
for signaling shutdown.
Modifier and Type | Field and Description |
---|---|
private CountDownLatch |
done |
Constructor and Description |
---|
AbstractClientApplication(BundleInstaller bundleInstaller,
ContainerActivator activator,
CurrentContainer container) |
Modifier and Type | Method and Description |
---|---|
void |
awaitShutdown() |
boolean |
awaitShutdown(int timeout,
TimeUnit unit) |
boolean |
isShutdown() |
void |
run() |
void |
shutdown() |
activateContainer, awaitTermination, awaitTermination, container, destroy, installAndStartBundle, installAndStartBundle, isTerminated, newContainerBuilder, stop, stopAndUninstallBundle, stopAndUninstallBundle
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
destroy, start, stop
private final CountDownLatch done
@Inject public AbstractClientApplication(BundleInstaller bundleInstaller, ContainerActivator activator, CurrentContainer container)
public final void shutdown()
public final boolean isShutdown()
public final boolean awaitShutdown(int timeout, TimeUnit unit) throws InterruptedException
InterruptedException
public final void awaitShutdown() throws InterruptedException
InterruptedException
Copyright © 2017. All rights reserved.