Search in sources :

Example 1 with RequestEvent

use of com.navercorp.pinpoint.collector.cluster.route.RequestEvent in project pinpoint by naver.

the class ClusterPointRouter method handleRouteRequest.

private boolean handleRouteRequest(TCommandTransfer request, RequestPacket requestPacket, PinpointSocket pinpointSocket) {
    byte[] payload = ((TCommandTransfer) request).getPayload();
    TBase<?, ?> command = deserialize(payload);
    TCommandTransferResponse response = routeHandler.onRoute(new RequestEvent((TCommandTransfer) request, pinpointSocket.getRemoteAddress(), requestPacket.getRequestId(), command));
    pinpointSocket.response(requestPacket, serialize(response));
    return response.getRouteResult() == TRouteResult.OK;
}
Also used : TCommandTransfer(com.navercorp.pinpoint.thrift.dto.command.TCommandTransfer) TCommandTransferResponse(com.navercorp.pinpoint.thrift.dto.command.TCommandTransferResponse) RequestEvent(com.navercorp.pinpoint.collector.cluster.route.RequestEvent)

Aggregations

RequestEvent (com.navercorp.pinpoint.collector.cluster.route.RequestEvent)1 TCommandTransfer (com.navercorp.pinpoint.thrift.dto.command.TCommandTransfer)1 TCommandTransferResponse (com.navercorp.pinpoint.thrift.dto.command.TCommandTransferResponse)1