public class PingResultTracker extends CompletableFuture<PingResponseDTO> implements PingResponseCallback
CompletableFuture.AsynchronousCompletionTask
Constructor and Description |
---|
PingResultTracker() |
Modifier and Type | Method and Description |
---|---|
void |
handleError(InetAddress address,
EchoPacket request,
Throwable t)
handleError
|
void |
handleResponse(InetAddress address,
EchoPacket response)
handleResponse
|
void |
handleTimeout(InetAddress address,
EchoPacket request)
handleTimeout
|
acceptEither, acceptEitherAsync, acceptEitherAsync, allOf, anyOf, applyToEither, applyToEitherAsync, applyToEitherAsync, cancel, complete, completedFuture, completeExceptionally, exceptionally, get, get, getNow, getNumberOfDependents, handle, handleAsync, handleAsync, isCancelled, isCompletedExceptionally, isDone, join, obtrudeException, obtrudeValue, 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
public void handleResponse(InetAddress address, EchoPacket response)
PingResponseCallback
handleResponse
handleResponse
in interface PingResponseCallback
address
- a InetAddress
object.response
- a EchoPacket
object.public void handleTimeout(InetAddress address, EchoPacket request)
PingResponseCallback
handleTimeout
handleTimeout
in interface PingResponseCallback
address
- a InetAddress
object.request
- TODOpublic void handleError(InetAddress address, EchoPacket request, Throwable t)
PingResponseCallback
handleError
handleError
in interface PingResponseCallback
address
- a InetAddress
object.request
- a EchoPacket
object.t
- a Throwable
object.Copyright © 2021. All rights reserved.