|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object raccoon.core.types.AbsComponent raccoon.core.types.AbsLoadable
public class AbsLoadable
Common features for a loadable component.
When building a component that is loadable only (neither configurable nor loggable) then it should extend/use this class.
Field Summary | |
---|---|
protected boolean |
mIsLoaded
The state of the component |
Fields inherited from class raccoon.core.types.AbsComponent |
---|
mIsInError |
Constructor Summary | |
---|---|
AbsLoadable()
|
Method Summary | |
---|---|
protected ILogger |
getLog()
|
boolean |
isInError()
Checks the state of this component. |
boolean |
isInitialised()
Is this component initialised or not? |
boolean |
isRunning()
Checks if the component has been loaded. |
void |
load()
Loads or initializes the component. |
void |
setLogger(ILogger pLogger)
Assigns the logger to the component. |
void |
unload()
Unloads or deactivates the component. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected boolean mIsLoaded
Constructor Detail |
---|
public AbsLoadable()
Method Detail |
---|
public void load() throws java.lang.IllegalStateException, LoadableException
load
in interface ILoadable
LoadableException
- if the component couldn't load itself.
java.lang.IllegalStateException
- if the component isn't in a state to load itself. for example it is already loaded.public void unload() throws java.lang.IllegalStateException, LoadableException
unload
in interface ILoadable
LoadableException
- if the component couldn't unload itself.
java.lang.IllegalStateException
- if this component isn't in a state to unload itself.public boolean isRunning()
isRunning
in interface ILoadable
true
if the component has been correctly loaded.public boolean isInError()
isInError
in interface IBaseComponent
isInError
in class AbsComponent
true
if this component is in error.public boolean isInitialised()
true
if the method load()
has been invoked.public void setLogger(ILogger pLogger) throws java.lang.IllegalStateException, ResourceNotFoundException
setLogger
in interface ILogable
pLogger
- the logging instance to use.
java.lang.IllegalStateException
- if the component is already loaded, valid only if the component implements the
ILoadable
interface.
ResourceNotFoundException
- if there is an internal configuration error related to Raccoon.protected ILogger getLog()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |