|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ISharedComponentControlHelper
Provides a way to control the shared component.
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 ISharedComponentController
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.
This helper is similar but quite different from the simpler IComponentControlHelper
as it covers more lifecycle cases
which ISharedComponent
has over simple IComponent
.
Method Summary | |
---|---|
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. |
Method Detail |
---|
void preStart() throws PogamutException
Similar to IComponentControlHelper.preStart()
(sort of a global version).
This method or 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 start()
is called right after ... nothing is taking place between these two calls.
preStart
in interface IComponentControlHelper
PogamutException
void start() throws PogamutException
Similar to IComponentControlHelper.start()
(sort of a global version).
This method or 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 IComponentControlHelper
PogamutException
void preStartPaused() throws PogamutException
You 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 startPaused()
is called right after ... nothing is taking place between these two calls.
preStartPaused
in interface IComponentControlHelper
PogamutException
void startPaused() throws PogamutException
Similar to IComponentControlHelper.startPaused()
(sort of a global version).
startPaused
in interface IComponentControlHelper
PogamutException
void prePause() throws PogamutException
Similar to IComponentControlHelper.prePause()
(sort of a global version).
NOTE: this method does not have much meaning for ISharedComponent
as method pause()
is called right after ... nothing is taking place between these two calls.
prePause
in interface IComponentControlHelper
PogamutException
void pause() throws PogamutException
Called whenever IPausingEvent
is caught from one of the dependencies.
Similar to IComponentControlHelper.pause()
(sort of a global version).
pause
in interface IComponentControlHelper
PogamutException
void preResume() throws PogamutException
Similar to IComponentControlHelper.preResume()
(sort of a global version).
NOTE: this method does not have much meaning for ISharedComponent
as method resume()
is called right after ... nothing is taking place between these two calls.
preResume
in interface IComponentControlHelper
PogamutException
void resume() throws PogamutException
Similar to IComponentControlHelper.resume()
(sort of a global version).
resume
in interface IComponentControlHelper
PogamutException
void preStop() throws PogamutException
Similar to IComponentControlHelper.preStop()
(sort of a global version).
preStop
in interface IComponentControlHelper
PogamutException
void stop() throws PogamutException
Similar to IComponentControlHelper.stop()
(sort of a global version).
NOTE: this method does not have much meaning for ISharedComponent
as method stop()
is called right after ... nothing is taking place between these two calls.
stop
in interface IComponentControlHelper
PogamutException
void kill()
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 IComponentControlHelper
void reset() throws PogamutException
IResetEvent
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 IComponentControlHelper
PogamutException
void localPreStart(IAgentId agentId) throws PogamutException
IStartingEvent
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
agentId
-
PogamutException
void localStart(IAgentId agentId) throws PogamutException
ILifecycleBus
of the agent identified by 'agentId'.
It should throw exception, if it can not start for the particular agent.
PogamutException
void localPreStartPaused(IAgentId agentId) throws PogamutException
IStartingPausedEvent
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.
agentId
-
PogamutException
void localStartPaused(IAgentId agentId) throws 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 IComponentControlHelper.pause()
.
agentId
-
PogamutException
void localPrePause(IAgentId agentId) throws PogamutException
IPausingEvent
of the component is broadcast into ILifecycleBus
of
the agent identified by 'agentId'.
You may need to pre-clean some stuff.
agentId
-
PogamutException
void localPause(IAgentId agentId) throws PogamutException
Called whenever IPausingEvent
is caught from one of the dependencies of the given agent.
agentId
-
PogamutException
void localPreResume(IAgentId agentId) throws PogamutException
IResumingEvent
of the component is broadcast into ILifecycleBus
of
the agent identified by 'agentId'.
You may need to pre-clean some stuff.
agentId
-
PogamutException
void localResume(IAgentId agentId) throws PogamutException
Called whenever IPausingEvent
is caught from one of the dependencies of the given agent.
agentId
-
PogamutException
void localPreStop(IAgentId agentId) throws PogamutException
IStoppingEvent
of the component is broadcast into ILifecycleBus
of
the agent identified by 'agentId'.
You may need to pre-clean some stuff.
agentId
-
PogamutException
void localStop(IAgentId agentId) throws PogamutException
It should throw an exception if the component can't be stopped for the given agent.
agentId
-
PogamutException
void localKill(IAgentId agentId)
Called whenever IFatalErrorEvent
is caught for a given agent.
Must not throw any exception whatsoever.
agentId
- void localReset(IAgentId agentId)
IResetEvent
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.
agentId
-
PogamutException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |