Search in sources :

Example 1 with PingResponse

use of org.opennms.netmgt.icmp.proxy.PingResponse in project opennms by OpenNMS.

the class SinglePingExecutionStrategy method execute.

@Override
public CompletableFuture<PingSummary> execute(PingRequestDTO requestDTO) {
    return client.execute(requestDTO).thenApply(responseDTO -> {
        final PingResponse pingResponse = new PingResponse();
        pingResponse.setRtt(responseDTO.getRtt());
        PingSummary summary = new PingSummary(requestDTO.toPingRequest(), 1);
        summary.addSequence(1, pingResponse);
        return summary;
    });
}
Also used : PingSummary(org.opennms.netmgt.icmp.proxy.PingSummary) PingResponse(org.opennms.netmgt.icmp.proxy.PingResponse)

Aggregations

PingResponse (org.opennms.netmgt.icmp.proxy.PingResponse)1 PingSummary (org.opennms.netmgt.icmp.proxy.PingSummary)1