public interface Daemon
extends java.lang.Runnable
Modifier and Type | Interface and Description |
---|---|
static class |
Daemon.State |
Modifier and Type | Method and Description |
---|---|
org.joda.time.DateTime |
errorTimestamp()
Returns the timestamp when last error happening
|
<T> T |
getAttribute(java.lang.String key)
Return the attribute set to the daemon
|
java.util.Map<java.lang.String,java.lang.Object> |
getAttributes()
Returns all attributes set on this daemon
|
java.lang.String |
id()
Returns ID of the daemon logic
|
java.lang.Exception |
lastError()
Returns last error
|
void |
removeAttribute(java.lang.String key)
Remove an attribute from a daemon
|
void |
restart()
|
void |
setAttribute(java.lang.String key,
java.lang.Object value)
Set an attribute to the daemon
|
void |
start()
Start this daemon
|
Daemon.State |
state()
Returns the
state of this daemon |
void |
stop()
Stop this daemon
|
org.joda.time.DateTime |
timestamp()
Returns the timestamp when last state transfer happening
|
void start()
Start this daemon
void stop()
Stop this daemon
void restart()
Daemon.State state()
Returns the state
of this daemon
org.joda.time.DateTime timestamp()
Returns the timestamp when last state transfer happening
java.lang.String id()
Returns ID of the daemon logic
java.lang.Exception lastError()
Returns last error
org.joda.time.DateTime errorTimestamp()
Returns the timestamp when last error happening
void setAttribute(java.lang.String key, java.lang.Object value)
Set an attribute to the daemon
key
- the attribute keyvalue
- attribute valuevoid removeAttribute(java.lang.String key)
Remove an attribute from a daemon
key
- the attribute key<T> T getAttribute(java.lang.String key)
Return the attribute set to the daemon
T
- the gneric type of the attribute valuekey
- the attribute keyjava.util.Map<java.lang.String,java.lang.Object> getAttributes()
Returns all attributes set on this daemon
Copyright © 2014–2017 ActFramework. All rights reserved.