public abstract class AbstractReader extends Object implements ReaderBase
| Modifier and Type | Field and Description |
|---|---|
protected InputGate |
inputGate
The input gate to read from.
|
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractReader(InputGate inputGate) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
handleEvent(AbstractEvent event)
Handles the event and returns whether the reader reached an end-of-stream event (either the
end of the whole stream or the end of an superstep).
|
boolean |
hasReachedEndOfSuperstep() |
boolean |
isFinished()
Returns whether the reader has consumed the input.
|
void |
publish(TaskEvent event) |
void |
registerTaskEventListener(EventListener<TaskEvent> listener,
Class<? extends TaskEvent> eventType) |
void |
sendTaskEvent(TaskEvent event) |
void |
setIterativeReader() |
void |
startNextSuperstep() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsetReporterprotected final InputGate inputGate
protected AbstractReader(InputGate inputGate)
public boolean isFinished()
ReaderBaseisFinished in interface ReaderBasepublic void registerTaskEventListener(EventListener<TaskEvent> listener, Class<? extends TaskEvent> eventType)
registerTaskEventListener in interface ReaderBasepublic void sendTaskEvent(TaskEvent event) throws IOException
sendTaskEvent in interface ReaderBaseIOExceptionprotected boolean handleEvent(AbstractEvent event) throws IOException
IOExceptionpublic void publish(TaskEvent event)
public void setIterativeReader()
setIterativeReader in interface ReaderBasepublic void startNextSuperstep()
startNextSuperstep in interface ReaderBasepublic boolean hasReachedEndOfSuperstep()
hasReachedEndOfSuperstep in interface ReaderBaseCopyright © 2014–2016 The Apache Software Foundation. All rights reserved.