|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.freehep.record.loop.SequentialRecordLoopImplManager
public class SequentialRecordLoopImplManager
The class is an implementation of the
SequentialRecordLoopManager
class that can manage the
default SequentialRecordLoop
implementation.
Constructor Summary | |
---|---|
SequentialRecordLoopImplManager(SequentialRecordLoopImpl recordLoop)
Create an instance of this class which is going to manage the specified SequentialRecordLoopImpl object. |
Method Summary | |
---|---|
void |
beginLoop(long target)
This method should be called before any loop begins. |
long |
endLoop()
This method should be called after the loop has ended. |
SequentialRecordLoop |
getRecordLoop()
|
boolean |
hasMoreRecords()
Returns true if there may be more records available and the number supplied has not reached the target. |
Object |
nextRecord()
This attempts to get a new record object from the source. |
void |
supplyRecord(Object record)
Supplies the specified record object, if it is not null, to the listener of the SequentialRecordLoopImpl object being managed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SequentialRecordLoopImplManager(SequentialRecordLoopImpl recordLoop)
recordLoop
- the object those loop is to be managed.Method Detail |
---|
public void beginLoop(long target) throws IllegalStateException
SequentialRecordLoopManager
beginLoop
in interface SequentialRecordLoopManager
target
- the number of records that should have been supplied.
IllegalStateException
- if this is called before a
source is set in the SequentialRecordLoopImpl object being managed.public long endLoop() throws LoopException
SequentialRecordLoopManager
endLoop
in interface SequentialRecordLoopManager
LoopInterruptedException
- if the loop is interrupted.
LoopSourceExhaustedException
- if target is non-negative and the
source runs out of records.
NoLoopRecordException
- if the record to supply could not be
found.
LoopException
public SequentialRecordLoop getRecordLoop()
getRecordLoop
in interface SequentialRecordLoopManager
public Object nextRecord() throws IOException
SequentialRecordLoopManager
nextRecord
in interface SequentialRecordLoopManager
IOException
- if there is a problem reading the next record.public boolean hasMoreRecords()
SequentialRecordLoopManager
hasMoreRecords
in interface SequentialRecordLoopManager
public void supplyRecord(Object record)
SequentialRecordLoopManager
supplyRecord
in interface SequentialRecordLoopManager
record
- the record object to be supplied.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |