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 StategetState()Get the state of the lifecyclelonggetUpTime()Get the time that the service has been up forbooleanisStarted()Whether the application is startedvoidstart()Start the applicationvoidstop()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:LifecycleServiceStart the application- Specified by:
startin interfaceLifecycleService
-
stop
public void stop()
Description copied from interface:LifecycleServiceStop the application- Specified by:
stopin interfaceLifecycleService
-
isStarted
public boolean isStarted()
Description copied from interface:LifecycleServiceWhether the application is started- Specified by:
isStartedin interfaceLifecycleService- Returns:
- True if the application is started
-
getState
public State getState()
Description copied from interface:LifecycleServiceGet the state of the lifecycle- Specified by:
getStatein interfaceLifecycleService- Returns:
- The state
-
getUpTime
public long getUpTime()
Description copied from interface:LifecycleServiceGet the time that the service has been up for- Specified by:
getUpTimein interfaceLifecycleService- Returns:
- The time that the service has been up for
-
-