Search in sources :

Example 1 with DefaultPinpointRouteResponse

use of com.navercorp.pinpoint.web.cluster.DefaultPinpointRouteResponse in project pinpoint by naver.

the class AgentServiceImpl method getResponse.

private PinpointRouteResponse getResponse(Future<ResponseMessage> future, long timeout) {
    if (future == null) {
        return new FailedPinpointRouteResponse(TRouteResult.NOT_FOUND, null);
    }
    boolean completed = future.await(timeout);
    if (completed) {
        DefaultPinpointRouteResponse response = new DefaultPinpointRouteResponse(future.getResult().getMessage());
        response.parse(commandDeserializerFactory);
        return response;
    } else {
        return new FailedPinpointRouteResponse(TRouteResult.TIMEOUT, null);
    }
}
Also used : DefaultPinpointRouteResponse(com.navercorp.pinpoint.web.cluster.DefaultPinpointRouteResponse) FailedPinpointRouteResponse(com.navercorp.pinpoint.web.cluster.FailedPinpointRouteResponse)

Aggregations

DefaultPinpointRouteResponse (com.navercorp.pinpoint.web.cluster.DefaultPinpointRouteResponse)1 FailedPinpointRouteResponse (com.navercorp.pinpoint.web.cluster.FailedPinpointRouteResponse)1