org.appdapter.module.basic
Class BasicModule<PM extends Modulator>
java.lang.Object
org.appdapter.core.log.BasicDebugger
org.appdapter.module.basic.BasicModule<PM>
- All Implemented Interfaces:
- Module<PM>
- Direct Known Subclasses:
- NullModule, TimedModule
public abstract class BasicModule<PM extends Modulator>
- extends BasicDebugger
- implements Module<PM>
- Author:
- Stu B.
| Nested classes/interfaces inherited from interface org.appdapter.api.module.Module |
Module.State |
BasicModule
public BasicModule()
getState
public Module.State getState()
- Specified by:
getState in interface Module<PM extends Modulator>
- Returns:
- Current state, subject to synchronization behavior of this module.
markStopRequested
public void markStopRequested()
- Specified by:
markStopRequested in interface Module<PM extends Modulator>
isStopRequested
public boolean isStopRequested()
- Specified by:
isStopRequested in interface Module<PM extends Modulator>
getParentModulator
public PM getParentModulator()
- Description copied from interface:
Module
- The Module must have a valid parentModulator whenever it is inside a module action callback.
- Specified by:
getParentModulator in interface Module<PM extends Modulator>
- Returns:
- Current Modulator, subject to synchronization behavior of this module.
setParentModulator
public void setParentModulator(PM m)
- Specified by:
setParentModulator in interface Module<PM extends Modulator>
notifyStateViolation
protected void notifyStateViolation(String detectingMethod,
String expectedStateDesc,
boolean throExcept)
verifyStoredState
protected void verifyStoredState(String checkingMethod,
boolean throExcept,
Module.State... allowedStates)
- Ensure we are in an allowed state, will notifyStateViolation if not.
failDuringInitOrStartup
public void failDuringInitOrStartup()
- Specified by:
failDuringInitOrStartup in interface Module<PM extends Modulator>
enterBasicInitModule
protected void enterBasicInitModule(boolean verifyPreInitState)
exitBasicInitModule
protected void exitBasicInitModule(boolean verifyInInitState)
enterBasicStart
protected void enterBasicStart()
exitBasicStart
protected void exitBasicStart()
enterBasicRunOnce
protected void enterBasicRunOnce()
exitBasicRunOnce
protected void exitBasicRunOnce()
enterBasicStop
protected void enterBasicStop()
exitBasicStop
protected void exitBasicStop()
enterBasicReleaseModule
protected void enterBasicReleaseModule()
exitBasicReleaseModule
protected void exitBasicReleaseModule()
getDescription
public String getDescription()
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2010-2012. All Rights Reserved.