Method Summary |
|
public void | addListener(LifecycleListener listener) Adds a listener to detect lifecycle changes. |
public void | copyState(Lifecycle source) Copies from a target state. |
public long | getActiveCount() Returns the number of times the lifecycle has switched to active. |
public long | getFailCount() Returns the number of times the lifecycle has switched to failing. |
public long | getLastChangeTime() Returns the last lifecycle change time. |
public long | getLastFailTime() Returns the last failure time. |
public Level | getLevel() Gets the lifecycle logging level. |
public String | getName() Gets the lifecycle name. |
public int | getState() Returns the current state. |
public static String | getStateName(int state) Returns the state name for the passed state. |
public String | getStateName() Returns the current state name. |
public boolean | isActive() Returns true for the active state. |
public boolean | isAfterActive() |
public boolean | isAfterInit() Returns true for the init state. |
public boolean | isBeforeActive() Returns true for the initializing state. |
public boolean | isBeforeInit() Returns true for the init state. |
public boolean | isDestroyed() |
public boolean | isDestroying() |
public boolean | isError() Returns true for the failed state. |
public boolean | isFailed() Returns true for the failed state. |
public boolean | isInit() Returns true for the init state. |
public boolean | isInitializing() Returns true for the initializing state. |
public boolean | isRunnable() |
public boolean | isStarting() Returns true if the service is starting. |
public boolean | isStopped() Returns true if the state is stopping. |
public boolean | isStopping() Returns true if the state is stopping. |
public boolean | isWarmup() Returns true for the warmup state. |
public void | removeListener(LifecycleListener listener) Removes a listener. |
public void | setLevel(Level level) Sets the lifecycle logging level. |
public void | setName(String name) Sets the lifecycle name, and the level to Level.INFO. |
public synchronized boolean | toActive() Changes to the active state. |
public synchronized boolean | toDestroy() Changes to the closed state. |
public synchronized boolean | toDestroying() Changes to the destroying state. |
public boolean | toError() Changes to the error state. |
public synchronized boolean | toFail() Changes to the failed state. |
public synchronized boolean | toInit() Changes to the init state. |
public synchronized boolean | toInitializing() Changes to the initializing state. |
public synchronized boolean | toPostInit() Changes to the init from the stopped state. |
public synchronized boolean | toStarting() Changes to the starting state. |
public synchronized boolean | toStop() Changes to the stopped state. |
public synchronized boolean | toStopping() Changes to the stopping state. |
public String | toString() Debug string value. |
public boolean | waitForActive(long timeout) Wait for a period of time until the service starts. |