Package ptolemy.domains.metroII.kernel
Interface GetFirable
-
- All Known Implementing Classes:
MetroIICompositeActor
,MetroIIDEDirector
,MetroIIDEDirectorForPtides
,MetroIIFSMDirector
,MetroIIMirrorComposite
,MetroIIMirrorComposite.MetroIIMirrorCompositeContents
,MetroIIModalModel
,MetroIIPNDirector
,MetroIIPtidesDirector
,MetroIIPtidesPlatform
,MetroIIPtidesPlatform.PtidesPlatformContents
,MetroIISequentialSDFDirector
,MetroIISRDirector
,MetroIISystemCDirector
public interface GetFirable
GetFirable is the Yieldadapter interface for actors. Any class implementing this interface has the ability to 'yield return' (@see net.jimblackler.Utils) in getfire() by calling 'resultHandler.handleResult(events)'.Instead of calling getfire() directly, the caller function should obtain an YieldAdapterIterable from adapter(). Every time YieldAdapterIterable.next() is called, getfire() starts or resumes from the last execution and runs until the next 'yield return' or 'return'. YieldAdapterIterable.next() returns an iterable, which is the list of events passed by 'resultHandler.handleResult(events)'. If YieldAdapterIterable.hasNext() returns false, it means getfire() has reached 'return' and terminated.
- Since:
- Ptolemy II 11.0
- Version:
- $Id$
- Author:
- Liangpeng Guo
- Pt.AcceptedRating:
- Red (glp)
- Pt.ProposedRating:
- Red (glp)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description net.jimblackler.Utils.YieldAdapterIterable<java.lang.Iterable<metroIIcomm.Event.Builder>>
adapter()
Return the iterator for the caller function of getfire().void
getfire(net.jimblackler.Utils.ResultHandler<java.lang.Iterable<metroIIcomm.Event.Builder>> resultHandler)
An implementation of getfire() has the ability to 'yield return' in getfire() by calling 'resultHandler.handleResult(events)'.
-
-
-
Method Detail
-
adapter
net.jimblackler.Utils.YieldAdapterIterable<java.lang.Iterable<metroIIcomm.Event.Builder>> adapter()
Return the iterator for the caller function of getfire().- Returns:
- iterator the iterator for the caller function of getfire()
-
getfire
void getfire(net.jimblackler.Utils.ResultHandler<java.lang.Iterable<metroIIcomm.Event.Builder>> resultHandler) throws net.jimblackler.Utils.CollectionAbortedException, IllegalActionException
An implementation of getfire() has the ability to 'yield return' in getfire() by calling 'resultHandler.handleResult(events)'.- Parameters:
resultHandler
- iterable of events 'yield returned'.- Throws:
net.jimblackler.Utils.CollectionAbortedException
IllegalActionException
-
-