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() |
protected final InputGate inputGate
protected AbstractReader(InputGate inputGate)
public boolean isFinished()
ReaderBase
isFinished
in interface ReaderBase
public void registerTaskEventListener(EventListener<TaskEvent> listener, Class<? extends TaskEvent> eventType)
registerTaskEventListener
in interface ReaderBase
public void sendTaskEvent(TaskEvent event) throws IOException
sendTaskEvent
in interface ReaderBase
IOException
protected boolean handleEvent(AbstractEvent event) throws IOException
IOException
public void publish(TaskEvent event)
public void setIterativeReader()
setIterativeReader
in interface ReaderBase
public void startNextSuperstep()
startNextSuperstep
in interface ReaderBase
public boolean hasReachedEndOfSuperstep()
hasReachedEndOfSuperstep
in interface ReaderBase
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.