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

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

public class ComponentControlHelper
extends java.lang.Object
implements IComponentControlHelper

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


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.
 java.lang.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 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:
PogamutException

pause

public void pause()
           throws 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:
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 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:
PogamutException

resume

public void resume()
            throws 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:
PogamutException

preStart

public void preStart()
              throws 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:
PogamutException

start

public void start()
           throws 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:
PogamutException

preStartPaused

public void preStartPaused()
                    throws 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:
PogamutException

startPaused

public void startPaused()
                 throws 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:
PogamutException

preStop

public void preStop()
             throws 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:
PogamutException

stop

public void stop()
          throws 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:
PogamutException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object