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

apache.rocketmq.v1.AdminGrpc Maven / Gradle / Ivy

There is a newer version: 2.0.7.Final
Show newest version
package apache.rocketmq.v1;

import static com.aliyun.openservices.ons.shaded.io.grpc.MethodDescriptor.generateFullMethodName;

/**
 */
@javax.annotation.Generated(
    value = "by gRPC proto compiler (version 1.35.0)",
    comments = "Source: apache/rocketmq/v1/admin.proto")
public final class AdminGrpc {

  private AdminGrpc() {}

  public static final String SERVICE_NAME = "apache.rocketmq.v1.Admin";

  // Static method descriptors that strictly reflect the proto.
  private static volatile com.aliyun.openservices.ons.shaded.io.grpc.MethodDescriptor getChangeLogLevelMethod;

  @com.aliyun.openservices.ons.shaded.io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "ChangeLogLevel",
      requestType = apache.rocketmq.v1.ChangeLogLevelRequest.class,
      responseType = apache.rocketmq.v1.ChangeLogLevelResponse.class,
      methodType = com.aliyun.openservices.ons.shaded.io.grpc.MethodDescriptor.MethodType.UNARY)
  public static com.aliyun.openservices.ons.shaded.io.grpc.MethodDescriptor getChangeLogLevelMethod() {
    com.aliyun.openservices.ons.shaded.io.grpc.MethodDescriptor getChangeLogLevelMethod;
    if ((getChangeLogLevelMethod = AdminGrpc.getChangeLogLevelMethod) == null) {
      synchronized (AdminGrpc.class) {
        if ((getChangeLogLevelMethod = AdminGrpc.getChangeLogLevelMethod) == null) {
          AdminGrpc.getChangeLogLevelMethod = getChangeLogLevelMethod =
              com.aliyun.openservices.ons.shaded.io.grpc.MethodDescriptor.newBuilder()
              .setType(com.aliyun.openservices.ons.shaded.io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ChangeLogLevel"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(com.aliyun.openservices.ons.shaded.io.grpc.protobuf.ProtoUtils.marshaller(
                  apache.rocketmq.v1.ChangeLogLevelRequest.getDefaultInstance()))
              .setResponseMarshaller(com.aliyun.openservices.ons.shaded.io.grpc.protobuf.ProtoUtils.marshaller(
                  apache.rocketmq.v1.ChangeLogLevelResponse.getDefaultInstance()))
              .setSchemaDescriptor(new AdminMethodDescriptorSupplier("ChangeLogLevel"))
              .build();
        }
      }
    }
    return getChangeLogLevelMethod;
  }

  /**
   * Creates a new async stub that supports all call types for the service
   */
  public static AdminStub newStub(com.aliyun.openservices.ons.shaded.io.grpc.Channel channel) {
    com.aliyun.openservices.ons.shaded.io.grpc.stub.AbstractStub.StubFactory factory =
      new com.aliyun.openservices.ons.shaded.io.grpc.stub.AbstractStub.StubFactory() {
        @java.lang.Override
        public AdminStub newStub(com.aliyun.openservices.ons.shaded.io.grpc.Channel channel, com.aliyun.openservices.ons.shaded.io.grpc.CallOptions callOptions) {
          return new AdminStub(channel, callOptions);
        }
      };
    return AdminStub.newStub(factory, channel);
  }

  /**
   * Creates a new blocking-style stub that supports unary and streaming output calls on the service
   */
  public static AdminBlockingStub newBlockingStub(
      com.aliyun.openservices.ons.shaded.io.grpc.Channel channel) {
    com.aliyun.openservices.ons.shaded.io.grpc.stub.AbstractStub.StubFactory factory =
      new com.aliyun.openservices.ons.shaded.io.grpc.stub.AbstractStub.StubFactory() {
        @java.lang.Override
        public AdminBlockingStub newStub(com.aliyun.openservices.ons.shaded.io.grpc.Channel channel, com.aliyun.openservices.ons.shaded.io.grpc.CallOptions callOptions) {
          return new AdminBlockingStub(channel, callOptions);
        }
      };
    return AdminBlockingStub.newStub(factory, channel);
  }

  /**
   * Creates a new ListenableFuture-style stub that supports unary calls on the service
   */
  public static AdminFutureStub newFutureStub(
      com.aliyun.openservices.ons.shaded.io.grpc.Channel channel) {
    com.aliyun.openservices.ons.shaded.io.grpc.stub.AbstractStub.StubFactory factory =
      new com.aliyun.openservices.ons.shaded.io.grpc.stub.AbstractStub.StubFactory() {
        @java.lang.Override
        public AdminFutureStub newStub(com.aliyun.openservices.ons.shaded.io.grpc.Channel channel, com.aliyun.openservices.ons.shaded.io.grpc.CallOptions callOptions) {
          return new AdminFutureStub(channel, callOptions);
        }
      };
    return AdminFutureStub.newStub(factory, channel);
  }

  /**
   */
  public static abstract class AdminImplBase implements com.aliyun.openservices.ons.shaded.io.grpc.BindableService {

    /**
     */
    public void changeLogLevel(apache.rocketmq.v1.ChangeLogLevelRequest request,
        com.aliyun.openservices.ons.shaded.io.grpc.stub.StreamObserver responseObserver) {
      com.aliyun.openservices.ons.shaded.io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getChangeLogLevelMethod(), responseObserver);
    }

    @java.lang.Override public final com.aliyun.openservices.ons.shaded.io.grpc.ServerServiceDefinition bindService() {
      return com.aliyun.openservices.ons.shaded.io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
          .addMethod(
            getChangeLogLevelMethod(),
            com.aliyun.openservices.ons.shaded.io.grpc.stub.ServerCalls.asyncUnaryCall(
              new MethodHandlers<
                apache.rocketmq.v1.ChangeLogLevelRequest,
                apache.rocketmq.v1.ChangeLogLevelResponse>(
                  this, METHODID_CHANGE_LOG_LEVEL)))
          .build();
    }
  }

  /**
   */
  public static final class AdminStub extends com.aliyun.openservices.ons.shaded.io.grpc.stub.AbstractAsyncStub {
    private AdminStub(
        com.aliyun.openservices.ons.shaded.io.grpc.Channel channel, com.aliyun.openservices.ons.shaded.io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected AdminStub build(
        com.aliyun.openservices.ons.shaded.io.grpc.Channel channel, com.aliyun.openservices.ons.shaded.io.grpc.CallOptions callOptions) {
      return new AdminStub(channel, callOptions);
    }

    /**
     */
    public void changeLogLevel(apache.rocketmq.v1.ChangeLogLevelRequest request,
        com.aliyun.openservices.ons.shaded.io.grpc.stub.StreamObserver responseObserver) {
      com.aliyun.openservices.ons.shaded.io.grpc.stub.ClientCalls.asyncUnaryCall(
          getChannel().newCall(getChangeLogLevelMethod(), getCallOptions()), request, responseObserver);
    }
  }

  /**
   */
  public static final class AdminBlockingStub extends com.aliyun.openservices.ons.shaded.io.grpc.stub.AbstractBlockingStub {
    private AdminBlockingStub(
        com.aliyun.openservices.ons.shaded.io.grpc.Channel channel, com.aliyun.openservices.ons.shaded.io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected AdminBlockingStub build(
        com.aliyun.openservices.ons.shaded.io.grpc.Channel channel, com.aliyun.openservices.ons.shaded.io.grpc.CallOptions callOptions) {
      return new AdminBlockingStub(channel, callOptions);
    }

    /**
     */
    public apache.rocketmq.v1.ChangeLogLevelResponse changeLogLevel(apache.rocketmq.v1.ChangeLogLevelRequest request) {
      return com.aliyun.openservices.ons.shaded.io.grpc.stub.ClientCalls.blockingUnaryCall(
          getChannel(), getChangeLogLevelMethod(), getCallOptions(), request);
    }
  }

  /**
   */
  public static final class AdminFutureStub extends com.aliyun.openservices.ons.shaded.io.grpc.stub.AbstractFutureStub {
    private AdminFutureStub(
        com.aliyun.openservices.ons.shaded.io.grpc.Channel channel, com.aliyun.openservices.ons.shaded.io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected AdminFutureStub build(
        com.aliyun.openservices.ons.shaded.io.grpc.Channel channel, com.aliyun.openservices.ons.shaded.io.grpc.CallOptions callOptions) {
      return new AdminFutureStub(channel, callOptions);
    }

    /**
     */
    public com.aliyun.openservices.ons.shaded.com.google.common.util.concurrent.ListenableFuture changeLogLevel(
        apache.rocketmq.v1.ChangeLogLevelRequest request) {
      return com.aliyun.openservices.ons.shaded.io.grpc.stub.ClientCalls.futureUnaryCall(
          getChannel().newCall(getChangeLogLevelMethod(), getCallOptions()), request);
    }
  }

  private static final int METHODID_CHANGE_LOG_LEVEL = 0;

  private static final class MethodHandlers implements
      com.aliyun.openservices.ons.shaded.io.grpc.stub.ServerCalls.UnaryMethod,
      com.aliyun.openservices.ons.shaded.io.grpc.stub.ServerCalls.ServerStreamingMethod,
      com.aliyun.openservices.ons.shaded.io.grpc.stub.ServerCalls.ClientStreamingMethod,
      com.aliyun.openservices.ons.shaded.io.grpc.stub.ServerCalls.BidiStreamingMethod {
    private final AdminImplBase serviceImpl;
    private final int methodId;

    MethodHandlers(AdminImplBase serviceImpl, int methodId) {
      this.serviceImpl = serviceImpl;
      this.methodId = methodId;
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("unchecked")
    public void invoke(Req request, com.aliyun.openservices.ons.shaded.io.grpc.stub.StreamObserver responseObserver) {
      switch (methodId) {
        case METHODID_CHANGE_LOG_LEVEL:
          serviceImpl.changeLogLevel((apache.rocketmq.v1.ChangeLogLevelRequest) request,
              (com.aliyun.openservices.ons.shaded.io.grpc.stub.StreamObserver) responseObserver);
          break;
        default:
          throw new AssertionError();
      }
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("unchecked")
    public com.aliyun.openservices.ons.shaded.io.grpc.stub.StreamObserver invoke(
        com.aliyun.openservices.ons.shaded.io.grpc.stub.StreamObserver responseObserver) {
      switch (methodId) {
        default:
          throw new AssertionError();
      }
    }
  }

  private static abstract class AdminBaseDescriptorSupplier
      implements com.aliyun.openservices.ons.shaded.io.grpc.protobuf.ProtoFileDescriptorSupplier, com.aliyun.openservices.ons.shaded.io.grpc.protobuf.ProtoServiceDescriptorSupplier {
    AdminBaseDescriptorSupplier() {}

    @java.lang.Override
    public com.aliyun.openservices.ons.shaded.com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
      return apache.rocketmq.v1.MQAdmin.getDescriptor();
    }

    @java.lang.Override
    public com.aliyun.openservices.ons.shaded.com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
      return getFileDescriptor().findServiceByName("Admin");
    }
  }

  private static final class AdminFileDescriptorSupplier
      extends AdminBaseDescriptorSupplier {
    AdminFileDescriptorSupplier() {}
  }

  private static final class AdminMethodDescriptorSupplier
      extends AdminBaseDescriptorSupplier
      implements com.aliyun.openservices.ons.shaded.io.grpc.protobuf.ProtoMethodDescriptorSupplier {
    private final String methodName;

    AdminMethodDescriptorSupplier(String methodName) {
      this.methodName = methodName;
    }

    @java.lang.Override
    public com.aliyun.openservices.ons.shaded.com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() {
      return getServiceDescriptor().findMethodByName(methodName);
    }
  }

  private static volatile com.aliyun.openservices.ons.shaded.io.grpc.ServiceDescriptor serviceDescriptor;

  public static com.aliyun.openservices.ons.shaded.io.grpc.ServiceDescriptor getServiceDescriptor() {
    com.aliyun.openservices.ons.shaded.io.grpc.ServiceDescriptor result = serviceDescriptor;
    if (result == null) {
      synchronized (AdminGrpc.class) {
        result = serviceDescriptor;
        if (result == null) {
          serviceDescriptor = result = com.aliyun.openservices.ons.shaded.io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
              .setSchemaDescriptor(new AdminFileDescriptorSupplier())
              .addMethod(getChangeLogLevelMethod())
              .build();
        }
      }
    }
    return result;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy