public class ContinuationListener
extends java.lang.Object
implements org.ojai.DocumentListener
CountDownLatch.countDown() when
it sees end of stream or a failure exception.
Override failed(Exception) if it is necessary to capture the
exception.| Constructor and Description |
|---|
ContinuationListener(java.util.concurrent.CountDownLatch latch)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
documentArrived(org.ojai.Document doc) |
void |
eos() |
void |
failed(java.lang.Exception e) |
public ContinuationListener(java.util.concurrent.CountDownLatch latch)
latch - the latch to signal on end of stream or when there's an error.public boolean documentArrived(org.ojai.Document doc)
documentArrived in interface org.ojai.DocumentListenerpublic void eos()
eos in interface org.ojai.DocumentListenerpublic void failed(java.lang.Exception e)
failed in interface org.ojai.DocumentListener