Search in sources :

Example 11 with PResult

use of com.navercorp.pinpoint.grpc.trace.PResult in project pinpoint by naver.

the class GrpcStringMetaDataHandler method handleRequest.

@Override
public void handleRequest(ServerRequest<GeneratedMessageV3> serverRequest, ServerResponse<GeneratedMessageV3> serverResponse) {
    final GeneratedMessageV3 data = serverRequest.getData();
    if (data instanceof PStringMetaData) {
        PResult result = handleStringMetaData((PStringMetaData) data);
        serverResponse.write(result);
    } else {
        logger.warn("Invalid request type. serverRequest={}", serverRequest);
        throw Status.INTERNAL.withDescription("Bad Request(invalid request type)").asRuntimeException();
    }
}
Also used : PStringMetaData(com.navercorp.pinpoint.grpc.trace.PStringMetaData) PResult(com.navercorp.pinpoint.grpc.trace.PResult) GeneratedMessageV3(com.google.protobuf.GeneratedMessageV3)

Aggregations

PResult (com.navercorp.pinpoint.grpc.trace.PResult)11 PSqlMetaData (com.navercorp.pinpoint.grpc.trace.PSqlMetaData)4 PStringMetaData (com.navercorp.pinpoint.grpc.trace.PStringMetaData)4 GeneratedMessageV3 (com.google.protobuf.GeneratedMessageV3)3 PAgentInfo (com.navercorp.pinpoint.grpc.trace.PAgentInfo)3 PApiMetaData (com.navercorp.pinpoint.grpc.trace.PApiMetaData)3 StreamObserver (io.grpc.stub.StreamObserver)2 InvalidProtocolBufferException (com.google.protobuf.InvalidProtocolBufferException)1 ResultResponse (com.navercorp.pinpoint.profiler.sender.ResultResponse)1 RetryResponseStreamObserver (com.navercorp.pinpoint.profiler.sender.grpc.RetryResponseStreamObserver)1 ResponseMessage (com.navercorp.pinpoint.rpc.ResponseMessage)1 Channel (io.grpc.Channel)1 Test (org.junit.Test)1