public interface IComponentControlHelper
We have purposefully created specific helper interface for the control of the IComponent. That's because
the designer of the component might want to hide its start/stop/kill method (e.g. they should not be accessible
by anyone). This is typical when using IComponentController to automatically start/stop the component
based on its dependencies.
So if you want to hide these methods from the public interface of your component, than create private inner class inside your component and implement how the component is starting/stopping/killing itself possibly by recalling private methods of the component.
| Modifier and Type | Method and Description |
|---|---|
void |
kill()
Kills the component in ruthless way.
|
void |
pause()
Pauses the component.
|
void |
prePause()
Called before the
IPausingEvent of the component is broadcast. |
void |
preResume()
Called before the
IResumingEvent of the component is broadcast. |
void |
preStart()
Called before the
IStartingEvent of the component is broadcast. |
void |
preStartPaused()
Called before
IStartingPausedEvent of the component is broadcast. |
void |
preStop()
Called before the
IStoppingEvent of the component is broadcast. |
void |
reset()
Called whenever
IResetEvent is caught. |
void |
resume()
Resumes the component.
|
void |
start()
Starts the component.
|
void |
startPaused()
Starts the component but it assumes that the component just prepares whatever data
structures it needs / make connections / handshake whatever it needs with the environment / etc.
|
void |
stop()
Stops the component.
|
void preStart()
throws cz.cuni.amis.utils.exception.PogamutException
IStartingEvent of the component is broadcast.
You may need to prepare some stuff before starting event is generated
cz.cuni.amis.utils.exception.PogamutExceptionvoid start()
throws cz.cuni.amis.utils.exception.PogamutException
cz.cuni.amis.utils.exception.PogamutExceptionvoid preStartPaused()
throws cz.cuni.amis.utils.exception.PogamutException
IStartingPausedEvent of the component is broadcast.
You may need to prepare some stuff before starting event is generated.
cz.cuni.amis.utils.exception.PogamutExceptionvoid startPaused()
throws cz.cuni.amis.utils.exception.PogamutException
It should not let the agent to perform designers work (i.e., UT2004 bots should not start playing in the game).
After this call, the component should behave as it would have been paused with pause().
cz.cuni.amis.utils.exception.PogamutExceptionvoid prePause()
throws cz.cuni.amis.utils.exception.PogamutException
IPausingEvent of the component is broadcast.
You may need to pre-clean some stuff.
cz.cuni.amis.utils.exception.PogamutExceptionvoid pause()
throws cz.cuni.amis.utils.exception.PogamutException
Called whenever IPausingEvent is caught from one of the dependencies.
cz.cuni.amis.utils.exception.PogamutExceptionvoid preResume()
throws cz.cuni.amis.utils.exception.PogamutException
IResumingEvent of the component is broadcast.
You may need to pre-clean some stuff.
cz.cuni.amis.utils.exception.PogamutExceptionvoid resume()
throws cz.cuni.amis.utils.exception.PogamutException
Called whenever IResumingEvent is caught from one of the dependencies.
cz.cuni.amis.utils.exception.PogamutExceptionvoid preStop()
throws cz.cuni.amis.utils.exception.PogamutException
IStoppingEvent of the component is broadcast.
You may need to pre-clean some stuff.
cz.cuni.amis.utils.exception.PogamutExceptionvoid stop()
throws cz.cuni.amis.utils.exception.PogamutException
It should throw an exception if the component can't be stopped.
cz.cuni.amis.utils.exception.PogamutExceptionvoid kill()
Called whenever IFatalErrorEvent is caught.
Must not throw any exception whatsoever.
void reset()
throws cz.cuni.amis.utils.exception.PogamutException
IResetEvent is caught. It should reinitialize data structures of the
component so it can be started again.
Should throw an exception in case that the component can't be reseted.
cz.cuni.amis.utils.exception.PogamutExceptionCopyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.