class CpuServiceProxy extends ServiceProxy {

  @Override
  public ServerServiceDefinition getServiceDefinition() {
    Map<MethodDescriptor, ServerCallHandler> overrides = new HashMap<>();
    overrides.put(CpuServiceGrpc.METHOD_START_PROFILING_APP,
                  ServerCalls.asyncUnaryCall((request, observer) -> {
                    startProfilingApp((CpuProfilingAppStartRequest)request, (StreamObserver)observer);
                  }));
    overrides.put(CpuServiceGrpc.METHOD_STOP_PROFILING_APP,
                  ServerCalls.asyncUnaryCall((request, observer) -> {
                    stopProfilingApp((CpuProfilingAppStopRequest)request, (StreamObserver)observer);
                  }));
    overrides.put(CpuServiceGrpc.METHOD_GET_TRACE_INFO,
                  ServerCalls.asyncUnaryCall((request, observer) -> {
                    getTraceInfo((GetTraceInfoRequest)request, (StreamObserver)observer);
                  }));

    return generatePassThroughDefinitions(overrides, myServiceStub);
  }

  public  CpuServiceProxy(@NotNull IDevice device,
                         @NotNull ManagedChannel channel,
                         @NotNull LegacyCpuTraceProfiler legacyProfiler);

}