|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthkontrol.core.AbstractModule
hkontrol.module.remotecontrol.Module
public class Module
| Constructor Summary | |
|---|---|
Module()
|
|
| Method Summary | |
|---|---|
protected HKConnection |
getConnection()
returns a HKConnection object if a connection is
associated with the calling module instance. |
protected boolean |
init()
is being called within the construct method to give the
module the chance to initialize itself while knowing about its
configuration. |
protected int |
work()
is called repeatedly by run in a seperate thread. |
| Methods inherited from class hkontrol.core.AbstractModule |
|---|
construct, getConfig, getState, run |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Module()
| Method Detail |
|---|
protected boolean init()
AbstractModuleconstruct method to give the
module the chance to initialize itself while knowing about its
configuration. If init returns false, the module
won't be used!
init in class AbstractModule
protected int work()
throws ModuleException
AbstractModulerun in a seperate thread. Since
doing some work and then sleeping some time is a common use case,
work must return the number of milliseconds that will have
to pass before work should be called again. As a matter of
fact, the implementing modules can be designed easily not to use this
mechanism but implement their own.
work in class AbstractModulework. If the returned value is negative the
module will cease execution.
ModuleException - which will be caught and logged
protected HKConnection getConnection()
throws ModuleException
HKConnection object if a connection is
associated with the calling module instance.
null if no connection
is configured
ModuleException - if connection could not be established
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||