org.eclipse.amp.axf.core
Class AbstractLifecycleListener

java.lang.Object
  extended by org.eclipse.amp.axf.core.AbstractLifecycleListener
All Implemented Interfaces:
ILifeCycleListener, IStateListener
Direct Known Subclasses:
DelayView, MonitorView, SWTThreadModelListener

public class AbstractLifecycleListener
extends java.lang.Object
implements ILifeCycleListener

The listener interface for receiving abstractModel events. The class that is interested in processing a abstractModel event implements this interface, and the object created with that class is registered with a component using the component's addAbstractModelListener method. When the abstractModel event occurs, that object's appropriate method is invoked.

See Also:
AbstractModelEvent

Constructor Summary
AbstractLifecycleListener()
          Instantiates a new abstract model listener.
AbstractLifecycleListener(java.lang.String name)
          Instantiates a new abstract model listener.
 
Method Summary
 IStateListener getListener()
           
 java.lang.String getName()
          Gets the name.
 void observationEnd(IObservationProvider observed)
          Notifies that the model is no longer providing observations.
 void observationEnding(IObservationProvider observed)
          Notifies that the model is about to be closed.
 void observeCreate(IObservationProvider observed)
          Notifies that the model has been instantiated but has not yet been initialized.
 void observeInitialize(IObservationProvider observed)
          Notifies that the model's initial state has been reached.
 void observeStart(IObservationProvider observed)
          Notifies that the model is just starting execution.
 void observeStop(IObservationProvider observed)
          Notifies that the model has stopped execution.
 void observeUpdate(IObservationProvider observed)
          Notifies that the model has completed one period of execution at the appropriate level of granularity.
 void observing(IObservationProvider observed)
          Notifies that the model is now aware of this observer.
 void setName(java.lang.String name)
          Sets the name.
 void stateChange(java.lang.Object key, java.lang.Object updated)
          Notifies that the model has had some kind of state or observation status change.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractLifecycleListener

public AbstractLifecycleListener()
Instantiates a new abstract model listener.


AbstractLifecycleListener

public AbstractLifecycleListener(java.lang.String name)
Instantiates a new abstract model listener.

Parameters:
name - the name
Method Detail

observationEnd

public void observationEnd(IObservationProvider observed)
Description copied from interface: ILifeCycleListener
Notifies that the model is no longer providing observations. Typically it has been disposed at this point.

Specified by:
observationEnd in interface ILifeCycleListener
Parameters:
observed -
See Also:
ILifeCycleListener.observationEnd(org.eclipse.amp.axf.core.IObservationProvider)

observationEnding

public void observationEnding(IObservationProvider observed)
Description copied from interface: ILifeCycleListener
Notifies that the model is about to be closed. The model should still be available for observation at this point.

Specified by:
observationEnding in interface ILifeCycleListener
Parameters:
observed -
See Also:
ILifeCycleListener.observationEnding(org.eclipse.amp.axf.core.IObservationProvider)

observeCreate

public void observeCreate(IObservationProvider observed)
Description copied from interface: ILifeCycleListener
Notifies that the model has been instantiated but has not yet been initialized. At this point it is appropriate to update settings and parameterizations.

Specified by:
observeCreate in interface ILifeCycleListener
Parameters:
observed -
See Also:
ILifeCycleListener.observeCreate(org.eclipse.amp.axf.core.IObservationProvider)

observeInitialize

public void observeInitialize(IObservationProvider observed)
Description copied from interface: ILifeCycleListener
Notifies that the model's initial state has been reached.

Specified by:
observeInitialize in interface ILifeCycleListener
Parameters:
observed -
See Also:
ILifeCycleListener.observeInitialize(org.eclipse.amp.axf.core.IObservationProvider)

observeStart

public void observeStart(IObservationProvider observed)
Description copied from interface: ILifeCycleListener
Notifies that the model is just starting execution.

Specified by:
observeStart in interface ILifeCycleListener
Parameters:
observed -
See Also:
ILifeCycleListener.observeStart(org.eclipse.amp.axf.core.IObservationProvider)

observeStop

public void observeStop(IObservationProvider observed)
Description copied from interface: ILifeCycleListener
Notifies that the model has stopped execution. This does not imply that the model is dead, simply that it will no longer be executing within the context of the life-cycle. In particular, a model may be re-initialized and re-started.

Specified by:
observeStop in interface ILifeCycleListener
Parameters:
observed -
See Also:
ILifeCycleListener.observeStop(org.eclipse.amp.axf.core.IObservationProvider)

observeUpdate

public void observeUpdate(IObservationProvider observed)
Description copied from interface: ILifeCycleListener
Notifies that the model has completed one period of execution at the appropriate level of granularity. Currently this is always once every period but that will change when more control of update granularity is introduced.

Specified by:
observeUpdate in interface ILifeCycleListener
Parameters:
observed -
See Also:
ILifeCycleListener.observeUpdate(org.eclipse.amp.axf.core.IObservationProvider)

observing

public void observing(IObservationProvider observed)
Description copied from interface: ILifeCycleListener
Notifies that the model is now aware of this observer. Note that models may defer addition of listeners so a listener adding itself to a model should not assume that it has actually been added until this notification has occurred.

Specified by:
observing in interface ILifeCycleListener
Parameters:
observed -
See Also:
ILifeCycleListener.observing(org.eclipse.amp.axf.core.IObservationProvider)

stateChange

public void stateChange(java.lang.Object key,
                        java.lang.Object updated)
Description copied from interface: IStateListener
Notifies that the model has had some kind of state or observation status change.

Specified by:
stateChange in interface IStateListener
Parameters:
key -
updated -
See Also:
IStateListener.stateChange(java.lang.Object, java.lang.Object)

getListener

public IStateListener getListener()
Returns:
the listener

getName

public java.lang.String getName()
Gets the name.

Returns:
the name

setName

public void setName(java.lang.String name)
Sets the name.

Parameters:
name - the new name

toString

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