public abstract class Service extends Object implements Runnable
Modifier and Type | Field and Description |
---|---|
protected Engine |
engine |
protected String |
serviceName |
Modifier | Constructor and Description |
---|---|
protected |
Service(Engine engine,
String serviceName)
Create service instance.
|
Modifier and Type | Method and Description |
---|---|
protected void |
execute()
Execute routine for overriding.
|
ServiceState |
getServiceState() |
abstract String |
getServiceStateInfo() |
protected void |
initialize()
Initialize routine for overriding.
|
void |
initiateShutdown(ScheduledThreadPoolExecutor executor)
Signaling and starting shutdown.
|
boolean |
isRunnningAndDbInstancesAvailable(boolean includeDirty)
Test if service is running and database is available.
|
void |
run()
Main service routine.
|
protected abstract void |
shutdown()
Shutdown routine for overriding.
|
public final ServiceState getServiceState()
public abstract String getServiceStateInfo()
public void run()
run
in interface Runnable
Runnable.run()
public final void initiateShutdown(ScheduledThreadPoolExecutor executor)
executor
- thread executor for free purposepublic final boolean isRunnningAndDbInstancesAvailable(boolean includeDirty)
includeDirty
- test dirty database includedprotected void initialize() throws Exception
Exception
Copyright © 2013. All Rights Reserved.