- java.lang.Object
-
- java.util.concurrent.CompletableFuture<PDU>
-
- org.snmp4j.fluent.SnmpCompletableFuture
-
- All Implemented Interfaces:
java.util.concurrent.CompletionStage<PDU>
,java.util.concurrent.Future<PDU>
,java.util.EventListener
,ResponseListener
public class SnmpCompletableFuture extends java.util.concurrent.CompletableFuture<PDU> implements ResponseListener
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SnmpCompletableFuture.ReportException
static class
SnmpCompletableFuture.SnmpErrorException
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ERR_TIMEOUT
protected java.lang.String
timeoutMessage
-
Constructor Summary
Constructors Modifier Constructor Description protected
SnmpCompletableFuture()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ResponseEvent<?>
getResponseEvent()
java.lang.Object[]
getUserObjects()
<A extends Address>
voidonResponse(ResponseEvent<A> event)
Process a SNMP response.static <A extends Address>
SnmpCompletableFuturesend(Snmp snmp, Target<A> target, PDU pdu, java.lang.Object... userObjects)
-
Methods inherited from class java.util.concurrent.CompletableFuture
acceptEither, acceptEitherAsync, acceptEitherAsync, allOf, anyOf, applyToEither, applyToEitherAsync, applyToEitherAsync, cancel, complete, completeAsync, completeAsync, completedFuture, completedStage, completeExceptionally, completeOnTimeout, copy, defaultExecutor, delayedExecutor, delayedExecutor, exceptionally, failedFuture, failedStage, get, get, getNow, getNumberOfDependents, handle, handleAsync, handleAsync, isCancelled, isCompletedExceptionally, isDone, join, minimalCompletionStage, newIncompleteFuture, obtrudeException, obtrudeValue, orTimeout, runAfterBoth, runAfterBothAsync, runAfterBothAsync, runAfterEither, runAfterEitherAsync, runAfterEitherAsync, runAsync, runAsync, supplyAsync, supplyAsync, thenAccept, thenAcceptAsync, thenAcceptAsync, thenAcceptBoth, thenAcceptBothAsync, thenAcceptBothAsync, thenApply, thenApplyAsync, thenApplyAsync, thenCombine, thenCombineAsync, thenCombineAsync, thenCompose, thenComposeAsync, thenComposeAsync, thenRun, thenRunAsync, thenRunAsync, toCompletableFuture, toString, whenComplete, whenCompleteAsync, whenCompleteAsync
-
-
-
-
Field Detail
-
ERR_TIMEOUT
public static final java.lang.String ERR_TIMEOUT
- See Also:
- Constant Field Values
-
timeoutMessage
protected java.lang.String timeoutMessage
-
-
Method Detail
-
onResponse
public <A extends Address> void onResponse(ResponseEvent<A> event)
Description copied from interface:ResponseListener
Process a SNMP response.- Specified by:
onResponse
in interfaceResponseListener
- Type Parameters:
A
- type of the targetAddress
- Parameters:
event
- aResponseEvent
.
-
getResponseEvent
public ResponseEvent<?> getResponseEvent()
-
send
public static <A extends Address> SnmpCompletableFuture send(Snmp snmp, Target<A> target, PDU pdu, java.lang.Object... userObjects)
-
getUserObjects
public java.lang.Object[] getUserObjects()
-
-