public class SharedComponentControlHelper extends Object implements ISharedComponentControlHelper
ISharedComponentControlHelper - override only these that you need.| Constructor and Description |
|---|
SharedComponentControlHelper() |
| Modifier and Type | Method and Description |
|---|---|
void |
kill()
Kills the component in ruthless way.
|
void |
localKill(IAgentId agentId)
Kills the component for the agent identified by 'agentId'.
|
void |
localPause(IAgentId agentId)
Pauses the component for agent identified by 'agentId'.
|
void |
localPrePause(IAgentId agentId)
Called before the
IPausingEvent of the component is broadcast into ILifecycleBus of
the agent identified by 'agentId'. |
void |
localPreResume(IAgentId agentId)
Called before the
IResumingEvent of the component is broadcast into ILifecycleBus of
the agent identified by 'agentId'. |
void |
localPreStart(IAgentId agentId)
Called before the
IStartingEvent of the component is broadcast into ILifecycleBus of
the agent identified by 'agentId'. |
void |
localPreStartPaused(IAgentId agentId)
Called before
IStartingPausedEvent of the component is broadcast into ILifecycleBus of
the agent identified by 'agentId'. |
void |
localPreStop(IAgentId agentId)
Called before the
IStoppingEvent of the component is broadcast into ILifecycleBus of
the agent identified by 'agentId'. |
void |
localReset(IAgentId agentId)
Called whenever
IResetEvent is caught at the ILifecycleBus of the agent identified by 'agentId'. |
void |
localResume(IAgentId agentId)
Resumes the component for the agent identified by 'agentId'.
|
void |
localStart(IAgentId agentId)
The component is being started inside the
ILifecycleBus of the agent identified by 'agentId'. |
void |
localStartPaused(IAgentId agentId)
Starts the component for the agent identified by 'agentId' but it assumes that the component just prepares whatever data
structures it needs / make connections / handshake whatever it needs with the environment / etc.
|
void |
localStop(IAgentId agentId)
Stops the component for the agent identified by 'agentId'.
|
void |
pause()
Pauses the component.
|
void |
prePause()
Called whenever there is no running dependencies and the rest is going to be paused or is paused.
|
void |
preResume()
Called whenever some of paused dependencies is starting / is started.
|
void |
preStart()
Called whenever starting dependencies of some (first) agent becomes satisfied.
|
void |
preStartPaused()
Called whenever starting dependencies of some (first) agent becomes satisfied, should start the component
into paused state.
|
void |
preStop()
Called whenever there is no running dependencies and the rest is going to be stopped.
|
void |
reset()
Called whenever
IResetEvent is caught in any of stopped bus. |
void |
resume()
Resumes the component.
|
void |
start()
Called to start the component whenever starting dependencies of some (first) agent becomes satisfied.
|
void |
startPaused()
Starts the component whenever starting dependencies of some (first) agent becomes satisfied.
|
void |
stop()
Stops the component.
|
public void localKill(IAgentId agentId)
ISharedComponentControlHelper
Called whenever IFatalErrorEvent is caught for a given agent.
Must not throw any exception whatsoever.
localKill in interface ISharedComponentControlHelperpublic void localPause(IAgentId agentId) throws cz.cuni.amis.utils.exception.PogamutException
ISharedComponentControlHelper
Called whenever IPausingEvent is caught from one of the dependencies of the given agent.
localPause in interface ISharedComponentControlHelpercz.cuni.amis.utils.exception.PogamutExceptionpublic void localPrePause(IAgentId agentId) throws cz.cuni.amis.utils.exception.PogamutException
ISharedComponentControlHelperIPausingEvent of the component is broadcast into ILifecycleBus of
the agent identified by 'agentId'.
You may need to pre-clean some stuff.
localPrePause in interface ISharedComponentControlHelpercz.cuni.amis.utils.exception.PogamutExceptionpublic void localPreResume(IAgentId agentId) throws cz.cuni.amis.utils.exception.PogamutException
ISharedComponentControlHelperIResumingEvent of the component is broadcast into ILifecycleBus of
the agent identified by 'agentId'.
You may need to pre-clean some stuff.
localPreResume in interface ISharedComponentControlHelpercz.cuni.amis.utils.exception.PogamutExceptionpublic void localPreStart(IAgentId agentId) throws cz.cuni.amis.utils.exception.PogamutException
ISharedComponentControlHelperIStartingEvent of the component is broadcast into ILifecycleBus of
the agent identified by 'agentId'.
You may need to prepare some stuff before starting event is generated
localPreStart in interface ISharedComponentControlHelpercz.cuni.amis.utils.exception.PogamutExceptionpublic void localPreStartPaused(IAgentId agentId) throws cz.cuni.amis.utils.exception.PogamutException
ISharedComponentControlHelperIStartingPausedEvent of the component is broadcast into ILifecycleBus of
the agent identified by 'agentId'.
You may need to prepare some stuff before starting event is generated.
localPreStartPaused in interface ISharedComponentControlHelpercz.cuni.amis.utils.exception.PogamutExceptionpublic void localPreStop(IAgentId agentId) throws cz.cuni.amis.utils.exception.PogamutException
ISharedComponentControlHelperIStoppingEvent of the component is broadcast into ILifecycleBus of
the agent identified by 'agentId'.
You may need to pre-clean some stuff.
localPreStop in interface ISharedComponentControlHelpercz.cuni.amis.utils.exception.PogamutExceptionpublic void localReset(IAgentId agentId)
ISharedComponentControlHelperIResetEvent is caught at the ILifecycleBus of the agent identified by 'agentId'.
It should reinitialize data structures of the component so it can be usable by the given agent again.
Should throw an exception in case that the component can't be reseted for a given agent.
localReset in interface ISharedComponentControlHelperpublic void localResume(IAgentId agentId) throws cz.cuni.amis.utils.exception.PogamutException
ISharedComponentControlHelper
Called whenever IPausingEvent is caught from one of the dependencies of the given agent.
localResume in interface ISharedComponentControlHelpercz.cuni.amis.utils.exception.PogamutExceptionpublic void localStart(IAgentId agentId) throws cz.cuni.amis.utils.exception.PogamutException
ISharedComponentControlHelperILifecycleBus of the agent identified by 'agentId'.
It should throw exception, if it can not start for the particular agent.localStart in interface ISharedComponentControlHelpercz.cuni.amis.utils.exception.PogamutExceptionpublic void localStartPaused(IAgentId agentId) throws cz.cuni.amis.utils.exception.PogamutException
ISharedComponentControlHelperIt 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 IComponentControlHelper.pause().
localStartPaused in interface ISharedComponentControlHelpercz.cuni.amis.utils.exception.PogamutExceptionpublic void localStop(IAgentId agentId) throws cz.cuni.amis.utils.exception.PogamutException
ISharedComponentControlHelperIt should throw an exception if the component can't be stopped for the given agent.
localStop in interface ISharedComponentControlHelpercz.cuni.amis.utils.exception.PogamutExceptionpublic void kill()
ISharedComponentControlHelper
Called whenever IFatalErrorEvent is caught in any agent's bus.
Must not throw any exception whatsoever.
Similar to IComponentControlHelper.kill() (sort of a global version).
kill in interface IComponentControlHelperkill in interface ISharedComponentControlHelperpublic void pause()
throws cz.cuni.amis.utils.exception.PogamutException
ISharedComponentControlHelper
Called whenever IPausingEvent is caught from one of the dependencies.
Similar to IComponentControlHelper.pause() (sort of a global version).
pause in interface IComponentControlHelperpause in interface ISharedComponentControlHelpercz.cuni.amis.utils.exception.PogamutExceptionpublic void prePause()
throws cz.cuni.amis.utils.exception.PogamutException
ISharedComponentControlHelper
Similar to IComponentControlHelper.prePause() (sort of a global version).
NOTE: this method does not have much meaning for ISharedComponent as method ISharedComponentControlHelper.pause()
is called right after ... nothing is taking place between these two calls.
prePause in interface IComponentControlHelperprePause in interface ISharedComponentControlHelpercz.cuni.amis.utils.exception.PogamutExceptionpublic void preResume()
throws cz.cuni.amis.utils.exception.PogamutException
ISharedComponentControlHelper
Similar to IComponentControlHelper.preResume() (sort of a global version).
NOTE: this method does not have much meaning for ISharedComponent as method ISharedComponentControlHelper.resume()
is called right after ... nothing is taking place between these two calls.
preResume in interface IComponentControlHelperpreResume in interface ISharedComponentControlHelpercz.cuni.amis.utils.exception.PogamutExceptionpublic void preStart()
throws cz.cuni.amis.utils.exception.PogamutException
ISharedComponentControlHelper
Similar to IComponentControlHelper.preStart() (sort of a global version).
This method or ISharedComponentControlHelper.preStartPaused() method is called prior to
any localXXX() methods are called. Which means that you are always informed that your component
should start before it "accepts" starts from respective agents.
NOTE: this method does not have much meaning for ISharedComponent as method ISharedComponentControlHelper.start()
is called right after ... nothing is taking place between these two calls.
preStart in interface IComponentControlHelperpreStart in interface ISharedComponentControlHelpercz.cuni.amis.utils.exception.PogamutExceptionpublic void preStartPaused()
throws cz.cuni.amis.utils.exception.PogamutException
ISharedComponentControlHelperYou may need to prepare some stuff before starting event is generated.
Similar to IComponentControlHelper.preStartPaused() (sort of a global version).
NOTE: this method does not have much meaning for ISharedComponent as method ISharedComponentControlHelper.startPaused()
is called right after ... nothing is taking place between these two calls.
preStartPaused in interface IComponentControlHelperpreStartPaused in interface ISharedComponentControlHelpercz.cuni.amis.utils.exception.PogamutExceptionpublic void preStop()
throws cz.cuni.amis.utils.exception.PogamutException
ISharedComponentControlHelper
Similar to IComponentControlHelper.preStop() (sort of a global version).
preStop in interface IComponentControlHelperpreStop in interface ISharedComponentControlHelpercz.cuni.amis.utils.exception.PogamutExceptionpublic void reset()
throws cz.cuni.amis.utils.exception.PogamutException
ISharedComponentControlHelperIResetEvent is caught in any of stopped bus.
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.
Similar to IComponentControlHelper.reset() (sort of a global version).
reset in interface IComponentControlHelperreset in interface ISharedComponentControlHelpercz.cuni.amis.utils.exception.PogamutExceptionpublic void resume()
throws cz.cuni.amis.utils.exception.PogamutException
ISharedComponentControlHelper
Similar to IComponentControlHelper.resume() (sort of a global version).
resume in interface IComponentControlHelperresume in interface ISharedComponentControlHelpercz.cuni.amis.utils.exception.PogamutExceptionpublic void start()
throws cz.cuni.amis.utils.exception.PogamutException
ISharedComponentControlHelper
Similar to IComponentControlHelper.start() (sort of a global version).
This method or ISharedComponentControlHelper.startPaused() method is called prior to
any localXXX() methods are called. Which means that you are always informed that your component
should start before it "accepts" starts from respective agents.
start in interface IComponentControlHelperstart in interface ISharedComponentControlHelpercz.cuni.amis.utils.exception.PogamutExceptionpublic void startPaused()
throws cz.cuni.amis.utils.exception.PogamutException
ISharedComponentControlHelper
Similar to IComponentControlHelper.startPaused() (sort of a global version).
startPaused in interface IComponentControlHelperstartPaused in interface ISharedComponentControlHelpercz.cuni.amis.utils.exception.PogamutExceptionpublic void stop()
throws cz.cuni.amis.utils.exception.PogamutException
ISharedComponentControlHelper
Similar to IComponentControlHelper.stop() (sort of a global version).
NOTE: this method does not have much meaning for ISharedComponent as method ISharedComponentControlHelper.stop()
is called right after ... nothing is taking place between these two calls.
stop in interface IComponentControlHelperstop in interface ISharedComponentControlHelpercz.cuni.amis.utils.exception.PogamutExceptionCopyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.