public abstract class GuiceDaemon extends Daemon implements StoppableService, GuiceLifecycleListener
| Constructor and Description |
|---|
GuiceDaemon() |
GuiceDaemon(boolean daemonThread) |
| Modifier and Type | Method and Description |
|---|---|
void |
postConstruct()
Called after Guice has fully and successfully constructed this object
|
protected boolean |
shouldStartAsDaemon() |
void |
shutdown()
Called to request this service clean up any ongoing work and terminate.
|
protected void |
sleep(long millis)
Sleep for the specified amount of time (unless the daemon is stopping, in which case do not sleep at all).
|
protected void |
sleep(Timeout timeout)
Sleep for the specified amount of time (unless the daemon is stopping, in which case do not sleep at all).
|
interrupt, isRunning, isThreadRunning, startThread, startThread, stopAll, stopThread, waitForTermination, waitForTerminationpublic GuiceDaemon()
public GuiceDaemon(boolean daemonThread)
protected boolean shouldStartAsDaemon()
shouldStartAsDaemon in class Daemonpublic void postConstruct()
GuiceLifecycleListenerpostConstruct in interface GuiceLifecycleListenerpublic void shutdown()
StoppableServiceShutdownManager.shutdown() for the shutdown sequence guaranteesshutdown in interface StoppableServiceprotected void sleep(long millis)
millis - the amount of time to sleep forprotected void sleep(Timeout timeout)
timeout - the amount of time to sleep forCopyright © 2014. All Rights Reserved.