- java.lang.Object
-
- org.snmp4j.uri.SnmpURI.AsyncTreeListener
-
- All Implemented Interfaces:
java.util.EventListener
,TreeListener
private class SnmpURI.AsyncTreeListener extends java.lang.Object implements TreeListener
-
-
Field Summary
Fields Modifier and Type Field Description private SnmpUriCallback
callback
private boolean
finished
private java.net.URI
url
-
Constructor Summary
Constructors Constructor Description AsyncTreeListener(java.net.URI url, SnmpUriCallback callback)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.
-
-
-
Field Detail
-
finished
private volatile boolean finished
-
url
private java.net.URI url
-
callback
private SnmpUriCallback callback
-
-
Constructor Detail
-
AsyncTreeListener
public AsyncTreeListener(java.net.URI url, SnmpUriCallback callback)
-
-
Method Detail
-
next
public boolean next(TreeEvent event)
Description copied from interface:TreeListener
Consumes the next table event, which is typically the next row in a table retrieval operation.- Specified by:
next
in interfaceTreeListener
- Parameters:
event
- aTableEvent
instance.- Returns:
true
if this listener wants to receive more events, otherwise returnfalse
. For example, aTreeListener
can returnfalse
to stop tree retrieval.
-
createResponse
private SnmpUriResponse createResponse(TreeEvent event)
-
finished
public void finished(TreeEvent event)
Description copied from interface:TreeListener
Indicates in a series of tree events that no more events will follow.- Specified by:
finished
in interfaceTreeListener
- Parameters:
event
- aTreeEvent
instance that will either indicate an error (RetrievalEvent.isError()
returnstrue
) or success of the tree retrieval operation.
-
isFinished
public boolean isFinished()
Description copied from interface:TreeListener
Indicates whether the tree walk is complete or not.- Specified by:
isFinished
in interfaceTreeListener
- Returns:
true
if it is complete,false
otherwise.
-
-