cz.cuni.amis.pogamut.base.component.controller
Class ComponentControlHelper

Package class diagram package ComponentControlHelper
java.lang.Object
  extended by cz.cuni.amis.pogamut.base.component.controller.ComponentControlHelper
All Implemented Interfaces:
IComponentControlHelper

public class ComponentControlHelper
extends Object
implements IComponentControlHelper

Provides empty implementations of life-cycle methods defined by IComponentControlHelper - override only these that you need.

Author:
Jimmy

Constructor Summary
ComponentControlHelper()
           
 
Method Summary
 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.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ComponentControlHelper

public ComponentControlHelper()
Method Detail

kill

public void kill()
Description copied from interface: IComponentControlHelper
Kills the component in ruthless way. It must be non-blocking method.

Called whenever IFatalErrorEvent is caught.

Must not throw any exception whatsoever.

Specified by:
kill in interface IComponentControlHelper

prePause

public void prePause()
              throws cz.cuni.amis.utils.exception.PogamutException
Description copied from interface: IComponentControlHelper
Called before the IPausingEvent of the component is broadcast.

You may need to pre-clean some stuff.

Specified by:
prePause in interface IComponentControlHelper
Throws:
cz.cuni.amis.utils.exception.PogamutException

pause

public void pause()
           throws cz.cuni.amis.utils.exception.PogamutException
Description copied from interface: IComponentControlHelper
Pauses the component.

Called whenever IPausingEvent is caught from one of the dependencies.

Specified by:
pause in interface IComponentControlHelper
Throws:
cz.cuni.amis.utils.exception.PogamutException

reset

public void reset()
Description copied from interface: IComponentControlHelper
Called whenever 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.

Specified by:
reset in interface IComponentControlHelper

preResume

public void preResume()
               throws cz.cuni.amis.utils.exception.PogamutException
Description copied from interface: IComponentControlHelper
Called before the IResumingEvent of the component is broadcast.

You may need to pre-clean some stuff.

Specified by:
preResume in interface IComponentControlHelper
Throws:
cz.cuni.amis.utils.exception.PogamutException

resume

public void resume()
            throws cz.cuni.amis.utils.exception.PogamutException
Description copied from interface: IComponentControlHelper
Resumes the component.

Called whenever IResumingEvent is caught from one of the dependencies.

Specified by:
resume in interface IComponentControlHelper
Throws:
cz.cuni.amis.utils.exception.PogamutException

preStart

public void preStart()
              throws cz.cuni.amis.utils.exception.PogamutException
Description copied from interface: IComponentControlHelper
Called before the IStartingEvent of the component is broadcast.

You may need to prepare some stuff before starting event is generated

Specified by:
preStart in interface IComponentControlHelper
Throws:
cz.cuni.amis.utils.exception.PogamutException

start

public void start()
           throws cz.cuni.amis.utils.exception.PogamutException
Description copied from interface: IComponentControlHelper
Starts the component. It should throw exception, if it can not start.

Specified by:
start in interface IComponentControlHelper
Throws:
cz.cuni.amis.utils.exception.PogamutException

preStartPaused

public void preStartPaused()
                    throws cz.cuni.amis.utils.exception.PogamutException
Description copied from interface: IComponentControlHelper
Called before IStartingPausedEvent of the component is broadcast.

You may need to prepare some stuff before starting event is generated.

Specified by:
preStartPaused in interface IComponentControlHelper
Throws:
cz.cuni.amis.utils.exception.PogamutException

startPaused

public void startPaused()
                 throws cz.cuni.amis.utils.exception.PogamutException
Description copied from interface: IComponentControlHelper
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.

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().

Specified by:
startPaused in interface IComponentControlHelper
Throws:
cz.cuni.amis.utils.exception.PogamutException

preStop

public void preStop()
             throws cz.cuni.amis.utils.exception.PogamutException
Description copied from interface: IComponentControlHelper
Called before the IStoppingEvent of the component is broadcast.

You may need to pre-clean some stuff.

Specified by:
preStop in interface IComponentControlHelper
Throws:
cz.cuni.amis.utils.exception.PogamutException

stop

public void stop()
          throws cz.cuni.amis.utils.exception.PogamutException
Description copied from interface: IComponentControlHelper
Stops the component.

It should throw an exception if the component can't be stopped.

Specified by:
stop in interface IComponentControlHelper
Throws:
cz.cuni.amis.utils.exception.PogamutException

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2015 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.