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)
TreeListenernext in interface TreeListenerevent - 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)
TreeListenerfinished in interface TreeListenerevent - a TreeEvent instance that will either indicate an error
(RetrievalEvent.isError() returns true) or success
of the tree retrieval operation.public boolean isFinished()
TreeListenerisFinished in interface TreeListenertrue if it is complete, false otherwise.