public interface GetFirable
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.
Modifier and Type | Method and Description |
---|---|
YieldAdapterIterable<java.lang.Iterable<metroIIcomm.Event.Builder>> |
adapter()
Return the iterator for the caller function of getfire().
|
void |
getfire(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)'.
|
YieldAdapterIterable<java.lang.Iterable<metroIIcomm.Event.Builder>> adapter()
void getfire(ResultHandler<java.lang.Iterable<metroIIcomm.Event.Builder>> resultHandler) throws CollectionAbortedException, IllegalActionException
resultHandler
- iterable of events 'yield returned'.CollectionAbortedException
IllegalActionException