Package ninja.lifecycle
Class LifecycleServiceImpl
- java.lang.Object
-
- ninja.lifecycle.LifecycleServiceImpl
-
- All Implemented Interfaces:
LifecycleService
public class LifecycleServiceImpl extends Object implements LifecycleService
Implementation of the lifecycle service
-
-
Constructor Summary
Constructors Constructor Description LifecycleServiceImpl(com.google.inject.Injector injector, ninja.lifecycle.LifecycleRegister lifecycleRegister, LifecycleSupport lifecycleSupport)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description State
getState()
Get the state of the lifecyclelong
getUpTime()
Get the time that the service has been up forboolean
isStarted()
Whether the application is startedvoid
start()
Start the applicationvoid
stop()
Stop the application
-
-
-
Constructor Detail
-
LifecycleServiceImpl
@Inject public LifecycleServiceImpl(com.google.inject.Injector injector, ninja.lifecycle.LifecycleRegister lifecycleRegister, LifecycleSupport lifecycleSupport)
-
-
Method Detail
-
start
public void start()
Description copied from interface:LifecycleService
Start the application- Specified by:
start
in interfaceLifecycleService
-
stop
public void stop()
Description copied from interface:LifecycleService
Stop the application- Specified by:
stop
in interfaceLifecycleService
-
isStarted
public boolean isStarted()
Description copied from interface:LifecycleService
Whether the application is started- Specified by:
isStarted
in interfaceLifecycleService
- Returns:
- True if the application is started
-
getState
public State getState()
Description copied from interface:LifecycleService
Get the state of the lifecycle- Specified by:
getState
in interfaceLifecycleService
- Returns:
- The state
-
getUpTime
public long getUpTime()
Description copied from interface:LifecycleService
Get the time that the service has been up for- Specified by:
getUpTime
in interfaceLifecycleService
- Returns:
- The time that the service has been up for
-
-