|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jsr.daemon.GenericDaemon
abstract generic daemon base class to be subclassed by daemons All singleton accesses are synchronized via this daemon instance if applicable.
Constructor Summary | |
GenericDaemon()
default constructor for this daemon |
Method Summary | |
void |
addListener(DaemonListener listener)
method for binding a listener to this daemon |
abstract void |
destroy()
destruction method for this daemon method is launched via the control interface and has to be subclassed |
protected void |
down(java.lang.Throwable throwable)
method for indicating the activity state of this daemon used by this daemon for managing its own activity state after calling down initialization is required for getting this daemon active again |
protected void |
finalize()
finalizer method for this daemon |
java.lang.Object |
getAttribute(java.lang.String name)
method getAttribute() of the configuration interface |
java.util.Enumeration |
getAttributeNames()
method getAttributeNames() of the configuration interface |
DaemonConfig |
getDaemonConfig()
access method for obtaining the application configuration interface of this daemon interface methods are also available via this daemon class |
protected DaemonContext |
getDaemonContext()
access to the service provider context interface of this daemon method is called by the container for supplying resources to be accessed via the configuration |
protected DaemonControl |
getDaemonControl()
access to the service provider control interface of this daemon method is called by the container for controlling the life state of this daemon |
java.lang.String |
getDaemonInfo()
descriptive information supplied by this daemon the class name of this daemon is supplied as the default implementation |
java.lang.String |
getDaemonName()
method getDaemonName() of the configuration interface |
protected DaemonEventHandler |
getEventHandler()
method for accessing the event handler of this daemon |
abstract void |
init()
initialization method for this daemon method is launched via the control interface and has to be subclassed |
boolean |
isActive()
life state indication of this daemon state is managed by the container and/or by this daemon |
void |
log(java.lang.String message)
method for logging output of this daemon logging resources are supplied via the daemon context |
void |
log(java.lang.String message,
java.lang.Throwable throwable)
method for logging extended output of this daemon logging resources are supplied via the daemon context |
void |
removeListener(DaemonListener listener)
method for unbinding a listener from this daemon |
protected void |
setActive(boolean active,
java.lang.Throwable throwable)
method for managing the activity state of this daemon |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public GenericDaemon()
Method Detail |
public abstract void init() throws DaemonException
init
in interface Daemon
DaemonException
- thrown by this daemon if initialization failspublic abstract void destroy()
destroy
in interface Daemon
protected DaemonContext getDaemonContext()
protected DaemonControl getDaemonControl()
protected DaemonEventHandler getEventHandler()
protected final void setActive(boolean active, java.lang.Throwable throwable)
active
- flag indicating the current activity statethrowable
- a throwable for indicating a possible exceptionprotected void down(java.lang.Throwable throwable)
throwable
- a throwable for indicating a possible exceptionpublic boolean isActive()
isActive
in interface Daemon
public void addListener(DaemonListener listener)
listener
- the daemon listener to be boundpublic void removeListener(DaemonListener listener)
listener
- the daemon listener to be unboundpublic java.lang.String getDaemonInfo()
getDaemonInfo
in interface Daemon
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
public DaemonConfig getDaemonConfig()
getDaemonConfig
in interface Daemon
public java.lang.Object getAttribute(java.lang.String name)
getAttribute
in interface DaemonConfig
name
- the name of the attribute to be retrievedpublic java.util.Enumeration getAttributeNames()
getAttributeNames
in interface DaemonConfig
public java.lang.String getDaemonName()
getDaemonName
in interface DaemonConfig
public void log(java.lang.String message)
log
in interface Logging
message
- the message to be logged via an underlying logging resourcepublic void log(java.lang.String message, java.lang.Throwable throwable)
log
in interface ExtendedLogging
message
- the message to be logged via an underlying logging resourcethrowable
- additional throwable with its stack trace to be logged
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |