net.sourceforge.cilib.algorithm
Interface AlgorithmListener

All Superinterfaces:
Cloneable, Serializable
All Known Implementing Classes:
Simulation, Time

public interface AlgorithmListener
extends Cloneable

Any class can implement this interface to be notified about algorithm events. Classes implementing this interface can be added to the algorithm as an event listener using Algorithm.addAlgorithmListener(AlgorithmListener).

Author:
Edwin Peer

Method Summary
 void algorithmFinished(AlgorithmEvent e)
          This event is fired when the algorithm has completed normally.
 void algorithmStarted(AlgorithmEvent e)
          This event is fired just prior to the execution of the main loop of the algorithm.
 void algorithmTerminated(AlgorithmEvent e)
          This event is fired when the algorithm is terminated abnormally.
 AlgorithmListener getClone()
          Create a cloned copy of the current object and return it.
 void iterationCompleted(AlgorithmEvent e)
          This event is fired after each iteration of the mail loop of the algorithm.
 

Method Detail

algorithmStarted

void algorithmStarted(AlgorithmEvent e)
This event is fired just prior to the execution of the main loop of the algorithm.

Parameters:
e - an event containing a reference to the source algorithm.

algorithmFinished

void algorithmFinished(AlgorithmEvent e)
This event is fired when the algorithm has completed normally.

Parameters:
e - an event containing a reference to the source algorithm.

algorithmTerminated

void algorithmTerminated(AlgorithmEvent e)
This event is fired when the algorithm is terminated abnormally.

Parameters:
e - an event containing a reference to the source algorithm.

iterationCompleted

void iterationCompleted(AlgorithmEvent e)
This event is fired after each iteration of the mail loop of the algorithm.

Parameters:
e - an event containing a reference to the source algorithm.

getClone

AlgorithmListener getClone()
Create a cloned copy of the current object and return it. In general the created copy will be a deep copy of the provided instance. As a result this operation an be quite expensive if used incorrectly.

Specified by:
getClone in interface Cloneable
Returns:
An exact clone of the current object instance.
See Also:
Object.clone()


Copyright © 2009 CIRG. All Rights Reserved.