Module org.snmp4j

Class SnmpCompletableFuture

java.lang.Object
java.util.concurrent.CompletableFuture<PDU>
org.snmp4j.fluent.SnmpCompletableFuture
All Implemented Interfaces:
CompletionStage<PDU>, Future<PDU>, EventListener, ResponseListener

public class SnmpCompletableFuture extends CompletableFuture<PDU> implements ResponseListener
The SnmpCompletableFuture implements a CompletableFuture for a PDU. It represents the result of an SNMP operation sending a PDU and receiving its response when the sent PDU was a confirmed one. This future can be completed normally and exceptionally. A normal completion is a successful SNMP operation. An unconfirmed operation completes always normally if the sending of the SNMP message was successful. Any error situation, like a response PDU with a non-zero error status, timeout, or PDU.REPORT PDU response. In the latter case, a SnmpCompletableFuture.ReportException will be returned. For a timeout, a TimeoutException, and for a SNMP error, a SnmpCompletableFuture.SnmpErrorException. If sending the SNMP message throws an exception, this exception is directly returned.
Since:
3.5.0
Author:
Frank Fock