All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.hyperledger.protos.AdminGrpc Maven / Gradle / Ivy

There is a newer version: 1.1
Show newest version
package org.hyperledger.protos;

import static io.grpc.stub.ClientCalls.asyncUnaryCall;
import static io.grpc.stub.ClientCalls.asyncServerStreamingCall;
import static io.grpc.stub.ClientCalls.asyncClientStreamingCall;
import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall;
import static io.grpc.stub.ClientCalls.blockingUnaryCall;
import static io.grpc.stub.ClientCalls.blockingServerStreamingCall;
import static io.grpc.stub.ClientCalls.futureUnaryCall;
import static io.grpc.MethodDescriptor.generateFullMethodName;
import static io.grpc.stub.ServerCalls.asyncUnaryCall;
import static io.grpc.stub.ServerCalls.asyncServerStreamingCall;
import static io.grpc.stub.ServerCalls.asyncClientStreamingCall;
import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall;
import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;
import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall;

/**
 * 
 * Interface exported by the server.
 * 
*/ @javax.annotation.Generated( value = "by gRPC proto compiler (version 0.15.0)", comments = "Source: server_admin.proto") public class AdminGrpc { private AdminGrpc() {} public static final String SERVICE_NAME = "protos.Admin"; // Static method descriptors that strictly reflect the proto. @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") public static final io.grpc.MethodDescriptor METHOD_GET_STATUS = io.grpc.MethodDescriptor.create( io.grpc.MethodDescriptor.MethodType.UNARY, generateFullMethodName( "protos.Admin", "GetStatus"), io.grpc.protobuf.ProtoUtils.marshaller(com.google.protobuf.Empty.getDefaultInstance()), io.grpc.protobuf.ProtoUtils.marshaller(org.hyperledger.protos.ServerAdmin.ServerStatus.getDefaultInstance())); @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") public static final io.grpc.MethodDescriptor METHOD_START_SERVER = io.grpc.MethodDescriptor.create( io.grpc.MethodDescriptor.MethodType.UNARY, generateFullMethodName( "protos.Admin", "StartServer"), io.grpc.protobuf.ProtoUtils.marshaller(com.google.protobuf.Empty.getDefaultInstance()), io.grpc.protobuf.ProtoUtils.marshaller(org.hyperledger.protos.ServerAdmin.ServerStatus.getDefaultInstance())); @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") public static final io.grpc.MethodDescriptor METHOD_STOP_SERVER = io.grpc.MethodDescriptor.create( io.grpc.MethodDescriptor.MethodType.UNARY, generateFullMethodName( "protos.Admin", "StopServer"), io.grpc.protobuf.ProtoUtils.marshaller(com.google.protobuf.Empty.getDefaultInstance()), io.grpc.protobuf.ProtoUtils.marshaller(org.hyperledger.protos.ServerAdmin.ServerStatus.getDefaultInstance())); /** * Creates a new async stub that supports all call types for the service */ public static AdminStub newStub(io.grpc.Channel channel) { return new AdminStub(channel); } /** * Creates a new blocking-style stub that supports unary and streaming output calls on the service */ public static AdminBlockingStub newBlockingStub( io.grpc.Channel channel) { return new AdminBlockingStub(channel); } /** * Creates a new ListenableFuture-style stub that supports unary and streaming output calls on the service */ public static AdminFutureStub newFutureStub( io.grpc.Channel channel) { return new AdminFutureStub(channel); } /** *
   * Interface exported by the server.
   * 
*/ @java.lang.Deprecated public static interface Admin { /** *
     * Return the serve status.
     * 
*/ public void getStatus(com.google.protobuf.Empty request, io.grpc.stub.StreamObserver responseObserver); /** */ public void startServer(com.google.protobuf.Empty request, io.grpc.stub.StreamObserver responseObserver); /** */ public void stopServer(com.google.protobuf.Empty request, io.grpc.stub.StreamObserver responseObserver); } @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1469") public static abstract class AdminImplBase implements Admin, io.grpc.BindableService { @java.lang.Override public void getStatus(com.google.protobuf.Empty request, io.grpc.stub.StreamObserver responseObserver) { asyncUnimplementedUnaryCall(METHOD_GET_STATUS, responseObserver); } @java.lang.Override public void startServer(com.google.protobuf.Empty request, io.grpc.stub.StreamObserver responseObserver) { asyncUnimplementedUnaryCall(METHOD_START_SERVER, responseObserver); } @java.lang.Override public void stopServer(com.google.protobuf.Empty request, io.grpc.stub.StreamObserver responseObserver) { asyncUnimplementedUnaryCall(METHOD_STOP_SERVER, responseObserver); } @java.lang.Override public io.grpc.ServerServiceDefinition bindService() { return AdminGrpc.bindService(this); } } /** *
   * Interface exported by the server.
   * 
*/ @java.lang.Deprecated public static interface AdminBlockingClient { /** *
     * Return the serve status.
     * 
*/ public org.hyperledger.protos.ServerAdmin.ServerStatus getStatus(com.google.protobuf.Empty request); /** */ public org.hyperledger.protos.ServerAdmin.ServerStatus startServer(com.google.protobuf.Empty request); /** */ public org.hyperledger.protos.ServerAdmin.ServerStatus stopServer(com.google.protobuf.Empty request); } /** *
   * Interface exported by the server.
   * 
*/ @java.lang.Deprecated public static interface AdminFutureClient { /** *
     * Return the serve status.
     * 
*/ public com.google.common.util.concurrent.ListenableFuture getStatus( com.google.protobuf.Empty request); /** */ public com.google.common.util.concurrent.ListenableFuture startServer( com.google.protobuf.Empty request); /** */ public com.google.common.util.concurrent.ListenableFuture stopServer( com.google.protobuf.Empty request); } public static class AdminStub extends io.grpc.stub.AbstractStub implements Admin { private AdminStub(io.grpc.Channel channel) { super(channel); } private AdminStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected AdminStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new AdminStub(channel, callOptions); } @java.lang.Override public void getStatus(com.google.protobuf.Empty request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( getChannel().newCall(METHOD_GET_STATUS, getCallOptions()), request, responseObserver); } @java.lang.Override public void startServer(com.google.protobuf.Empty request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( getChannel().newCall(METHOD_START_SERVER, getCallOptions()), request, responseObserver); } @java.lang.Override public void stopServer(com.google.protobuf.Empty request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( getChannel().newCall(METHOD_STOP_SERVER, getCallOptions()), request, responseObserver); } } public static class AdminBlockingStub extends io.grpc.stub.AbstractStub implements AdminBlockingClient { private AdminBlockingStub(io.grpc.Channel channel) { super(channel); } private AdminBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected AdminBlockingStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new AdminBlockingStub(channel, callOptions); } @java.lang.Override public org.hyperledger.protos.ServerAdmin.ServerStatus getStatus(com.google.protobuf.Empty request) { return blockingUnaryCall( getChannel(), METHOD_GET_STATUS, getCallOptions(), request); } @java.lang.Override public org.hyperledger.protos.ServerAdmin.ServerStatus startServer(com.google.protobuf.Empty request) { return blockingUnaryCall( getChannel(), METHOD_START_SERVER, getCallOptions(), request); } @java.lang.Override public org.hyperledger.protos.ServerAdmin.ServerStatus stopServer(com.google.protobuf.Empty request) { return blockingUnaryCall( getChannel(), METHOD_STOP_SERVER, getCallOptions(), request); } } public static class AdminFutureStub extends io.grpc.stub.AbstractStub implements AdminFutureClient { private AdminFutureStub(io.grpc.Channel channel) { super(channel); } private AdminFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected AdminFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new AdminFutureStub(channel, callOptions); } @java.lang.Override public com.google.common.util.concurrent.ListenableFuture getStatus( com.google.protobuf.Empty request) { return futureUnaryCall( getChannel().newCall(METHOD_GET_STATUS, getCallOptions()), request); } @java.lang.Override public com.google.common.util.concurrent.ListenableFuture startServer( com.google.protobuf.Empty request) { return futureUnaryCall( getChannel().newCall(METHOD_START_SERVER, getCallOptions()), request); } @java.lang.Override public com.google.common.util.concurrent.ListenableFuture stopServer( com.google.protobuf.Empty request) { return futureUnaryCall( getChannel().newCall(METHOD_STOP_SERVER, getCallOptions()), request); } } @java.lang.Deprecated public static abstract class AbstractAdmin extends AdminImplBase {} private static final int METHODID_GET_STATUS = 0; private static final int METHODID_START_SERVER = 1; private static final int METHODID_STOP_SERVER = 2; private static class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, io.grpc.stub.ServerCalls.ServerStreamingMethod, io.grpc.stub.ServerCalls.ClientStreamingMethod, io.grpc.stub.ServerCalls.BidiStreamingMethod { private final Admin serviceImpl; private final int methodId; public MethodHandlers(Admin serviceImpl, int methodId) { this.serviceImpl = serviceImpl; this.methodId = methodId; } @java.lang.Override @java.lang.SuppressWarnings("unchecked") public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { switch (methodId) { case METHODID_GET_STATUS: serviceImpl.getStatus((com.google.protobuf.Empty) request, (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_START_SERVER: serviceImpl.startServer((com.google.protobuf.Empty) request, (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_STOP_SERVER: serviceImpl.stopServer((com.google.protobuf.Empty) request, (io.grpc.stub.StreamObserver) responseObserver); break; default: throw new AssertionError(); } } @java.lang.Override @java.lang.SuppressWarnings("unchecked") public io.grpc.stub.StreamObserver invoke( io.grpc.stub.StreamObserver responseObserver) { switch (methodId) { default: throw new AssertionError(); } } } public static io.grpc.ServiceDescriptor getServiceDescriptor() { return new io.grpc.ServiceDescriptor(SERVICE_NAME, METHOD_GET_STATUS, METHOD_START_SERVER, METHOD_STOP_SERVER); } @java.lang.Deprecated public static io.grpc.ServerServiceDefinition bindService( final Admin serviceImpl) { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( METHOD_GET_STATUS, asyncUnaryCall( new MethodHandlers< com.google.protobuf.Empty, org.hyperledger.protos.ServerAdmin.ServerStatus>( serviceImpl, METHODID_GET_STATUS))) .addMethod( METHOD_START_SERVER, asyncUnaryCall( new MethodHandlers< com.google.protobuf.Empty, org.hyperledger.protos.ServerAdmin.ServerStatus>( serviceImpl, METHODID_START_SERVER))) .addMethod( METHOD_STOP_SERVER, asyncUnaryCall( new MethodHandlers< com.google.protobuf.Empty, org.hyperledger.protos.ServerAdmin.ServerStatus>( serviceImpl, METHODID_STOP_SERVER))) .build(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy