private class SnmpURI.AsyncTreeListener extends java.lang.Object implements TreeListener
Modifier and Type | Field and Description |
---|---|
private SnmpUriCallback |
callback |
private boolean |
finished |
private java.net.URI |
url |
Constructor and Description |
---|
AsyncTreeListener(java.net.URI url,
SnmpUriCallback callback) |
Modifier and Type | Method and Description |
---|---|
private SnmpUriResponse |
createResponse(TreeEvent event) |
void |
finished(TreeEvent event)
Indicates in a series of tree events that no more events will follow.
|
boolean |
isFinished()
Indicates whether the tree walk is complete or not.
|
boolean |
next(TreeEvent event)
Consumes the next table event, which is typically the next row in a
table retrieval operation.
|
private volatile boolean finished
private java.net.URI url
private SnmpUriCallback callback
public AsyncTreeListener(java.net.URI url, SnmpUriCallback callback)
public boolean next(TreeEvent event)
TreeListener
next
in interface TreeListener
event
- a TableEvent
instance.true
if this listener wants to receive more events,
otherwise return false
. For example, a
TreeListener
can return false
to stop
tree retrieval.private SnmpUriResponse createResponse(TreeEvent event)
public void finished(TreeEvent event)
TreeListener
finished
in interface TreeListener
event
- a TreeEvent
instance that will either indicate an error
(RetrievalEvent.isError()
returns true
) or success
of the tree retrieval operation.public boolean isFinished()
TreeListener
isFinished
in interface TreeListener
true
if it is complete, false
otherwise.