Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package io.grpc.testing;
  
  import static io.grpc.stub.Calls.createMethodDescriptor;
  import static io.grpc.stub.Calls.asyncUnaryCall;
  import static io.grpc.stub.Calls.asyncServerStreamingCall;
  import static io.grpc.stub.Calls.asyncClientStreamingCall;
  import static io.grpc.stub.Calls.duplexStreamingCall;
  import static io.grpc.stub.Calls.blockingUnaryCall;
  import static io.grpc.stub.Calls.blockingServerStreamingCall;
 import static io.grpc.stub.Calls.unaryFutureCall;
 import static io.grpc.stub.ServerCalls.createMethodDefinition;
 import static io.grpc.stub.ServerCalls.asyncUnaryRequestCall;
 import static io.grpc.stub.ServerCalls.asyncStreamingRequestCall;
 
 @javax.annotation.Generated("by gRPC proto compiler")
 public class WorkerGrpc {
 
   private static final io.grpc.stub.Method<io.grpc.testing.ClientArgs,
       io.grpc.stub.Method.create(
           ..."RunTest",
           io.grpc.protobuf.ProtoUtils.marshaller(....),
           io.grpc.protobuf.ProtoUtils.marshaller(....));
   private static final io.grpc.stub.Method<io.grpc.testing.ServerArgs,
       io.grpc.stub.Method.create(
           ..."RunServer",
           io.grpc.protobuf.ProtoUtils.marshaller(....),
           io.grpc.protobuf.ProtoUtils.marshaller(....));
 
   public static WorkerStub newStub(io.grpc.Channel channel) {
     return new WorkerStub(channel);
   }
 
   public static WorkerBlockingStub newBlockingStub(
       io.grpc.Channel channel) {
     return new WorkerBlockingStub(channel);
   }
 
   public static WorkerFutureStub newFutureStub(
       io.grpc.Channel channel) {
     return new WorkerFutureStub(channel);
   }
 
   public static final WorkerServiceDescriptor CONFIG =
       new WorkerServiceDescriptor();
 
   public static class WorkerServiceDescriptor extends
     public final io.grpc.MethodDescriptor<io.grpc.testing.ClientArgs,
         io.grpc.testing.ClientStatusrunTest;
     public final io.grpc.MethodDescriptor<io.grpc.testing.ServerArgs,
         io.grpc.testing.ServerStatusrunServer;
 
     private WorkerServiceDescriptor() {
           "grpc.testing.Worker");
           "grpc.testing.Worker");
     }
 
     @SuppressWarnings("unchecked")
     private WorkerServiceDescriptor(
         java.util.Map<java.lang.Stringio.grpc.MethodDescriptor<?, ?>> methodMap) {
           io.grpc.testing.ClientStatus>) methodMap.get(
           ..getName());
           io.grpc.testing.ServerStatus>) methodMap.get(
           ..getName());
     }
 
     @java.lang.Override
     protected WorkerServiceDescriptor build(
         java.util.Map<java.lang.Stringio.grpc.MethodDescriptor<?, ?>> methodMap) {
       return new WorkerServiceDescriptor(methodMap);
     }
 
     @java.lang.Override
       return com.google.common.collect.ImmutableList.<io.grpc.MethodDescriptor<?, ?>>of(
           ,
           );
     }
   }
 
   public static interface Worker {
 
         io.grpc.stub.StreamObserver<io.grpc.testing.ClientStatusresponseObserver);
 
         io.grpc.stub.StreamObserver<io.grpc.testing.ServerStatusresponseObserver);
   }
 
   public static interface WorkerBlockingClient {
   }
 
  public static interface WorkerFutureClient {
  }
  public static class WorkerStub extends
      implements Worker {
    private WorkerStub(io.grpc.Channel channel,
        WorkerServiceDescriptor config) {
      super(channelconfig);
    }
    protected WorkerStub build(io.grpc.Channel channel,
        WorkerServiceDescriptor config) {
      return new WorkerStub(channelconfig);
    }
        io.grpc.stub.StreamObserver<io.grpc.testing.ClientStatusresponseObserver) {
      return duplexStreamingCall(
          .newCall(.), responseObserver);
    }
        io.grpc.stub.StreamObserver<io.grpc.testing.ServerStatusresponseObserver) {
      return duplexStreamingCall(
          .newCall(.), responseObserver);
    }
  }
  public static class WorkerBlockingStub extends
      implements WorkerBlockingClient {
    private WorkerBlockingStub(io.grpc.Channel channel,
        WorkerServiceDescriptor config) {
      super(channelconfig);
    }
    protected WorkerBlockingStub build(io.grpc.Channel channel,
        WorkerServiceDescriptor config) {
      return new WorkerBlockingStub(channelconfig);
    }
  }
  public static class WorkerFutureStub extends
      implements WorkerFutureClient {
    private WorkerFutureStub(io.grpc.Channel channel,
        WorkerServiceDescriptor config) {
      super(channelconfig);
    }
    protected WorkerFutureStub build(io.grpc.Channel channel,
        WorkerServiceDescriptor config) {
      return new WorkerFutureStub(channelconfig);
    }
  }
      final Worker serviceImpl) {
    return io.grpc.ServerServiceDefinition.builder("grpc.testing.Worker")
          ,
          asyncStreamingRequestCall(
            new io.grpc.stub.ServerCalls.StreamingRequestMethod<
                io.grpc.testing.ClientArgs,
                io.grpc.testing.ClientStatus>() {
              @java.lang.Override
              public io.grpc.stub.StreamObserver<io.grpc.testing.ClientArgsinvoke(
                  io.grpc.stub.StreamObserver<io.grpc.testing.ClientStatusresponseObserver) {
                return serviceImpl.runTest(responseObserver);
              }
            })))
          ,
          asyncStreamingRequestCall(
            new io.grpc.stub.ServerCalls.StreamingRequestMethod<
                io.grpc.testing.ServerArgs,
                io.grpc.testing.ServerStatus>() {
              @java.lang.Override
              public io.grpc.stub.StreamObserver<io.grpc.testing.ServerArgsinvoke(
                  io.grpc.stub.StreamObserver<io.grpc.testing.ServerStatusresponseObserver) {
                return serviceImpl.runServer(responseObserver);
              }
            }))).build();
  }
New to GrepCode? Check out our FAQ X