ninja.lifecycle
Class LifecycleServiceImpl

java.lang.Object
  extended by ninja.lifecycle.LifecycleServiceImpl
All Implemented Interfaces:
LifecycleService

public class LifecycleServiceImpl
extends Object
implements LifecycleService

Implementation of the lifecycle service


Constructor Summary
LifecycleServiceImpl(com.google.inject.Injector injector, ninja.lifecycle.LifecycleRegister lifecycleRegister, LifecycleSupport lifecycleSupport)
           
 
Method Summary
 State getState()
          Get the state of the lifecycle
 long getUpTime()
          Get the time that the service has been up for
 boolean isStarted()
          Whether the application is started
 void start()
          Start the application
 void stop()
          Stop the application
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 interface LifecycleService

stop

public void stop()
Description copied from interface: LifecycleService
Stop the application

Specified by:
stop in interface LifecycleService

isStarted

public boolean isStarted()
Description copied from interface: LifecycleService
Whether the application is started

Specified by:
isStarted in interface LifecycleService
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 interface LifecycleService
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 interface LifecycleService
Returns:
The time that the service has been up for


Copyright © 2012. All Rights Reserved.