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

com.daml.ledger.api.v1.VersionServiceGrpc Maven / Gradle / Ivy

package com.daml.ledger.api.v1;

import static io.grpc.MethodDescriptor.generateFullMethodName;

/**
 * 
 * Allows clients to retrieve information about the ledger API version
 * 
*/ @javax.annotation.Generated( value = "by gRPC proto compiler", comments = "Source: com/daml/ledger/api/v1/version_service.proto") @io.grpc.stub.annotations.GrpcGenerated public final class VersionServiceGrpc { private VersionServiceGrpc() {} public static final String SERVICE_NAME = "com.daml.ledger.api.v1.VersionService"; // Static method descriptors that strictly reflect the proto. private static volatile io.grpc.MethodDescriptor getGetLedgerApiVersionMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "GetLedgerApiVersion", requestType = com.daml.ledger.api.v1.VersionServiceOuterClass.GetLedgerApiVersionRequest.class, responseType = com.daml.ledger.api.v1.VersionServiceOuterClass.GetLedgerApiVersionResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor getGetLedgerApiVersionMethod() { io.grpc.MethodDescriptor getGetLedgerApiVersionMethod; if ((getGetLedgerApiVersionMethod = VersionServiceGrpc.getGetLedgerApiVersionMethod) == null) { synchronized (VersionServiceGrpc.class) { if ((getGetLedgerApiVersionMethod = VersionServiceGrpc.getGetLedgerApiVersionMethod) == null) { VersionServiceGrpc.getGetLedgerApiVersionMethod = getGetLedgerApiVersionMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetLedgerApiVersion")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( com.daml.ledger.api.v1.VersionServiceOuterClass.GetLedgerApiVersionRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( com.daml.ledger.api.v1.VersionServiceOuterClass.GetLedgerApiVersionResponse.getDefaultInstance())) .setSchemaDescriptor(new VersionServiceMethodDescriptorSupplier("GetLedgerApiVersion")) .build(); } } } return getGetLedgerApiVersionMethod; } /** * Creates a new async stub that supports all call types for the service */ public static VersionServiceStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { @java.lang.Override public VersionServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new VersionServiceStub(channel, callOptions); } }; return VersionServiceStub.newStub(factory, channel); } /** * Creates a new blocking-style stub that supports unary and streaming output calls on the service */ public static VersionServiceBlockingStub newBlockingStub( io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { @java.lang.Override public VersionServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new VersionServiceBlockingStub(channel, callOptions); } }; return VersionServiceBlockingStub.newStub(factory, channel); } /** * Creates a new ListenableFuture-style stub that supports unary calls on the service */ public static VersionServiceFutureStub newFutureStub( io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { @java.lang.Override public VersionServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new VersionServiceFutureStub(channel, callOptions); } }; return VersionServiceFutureStub.newStub(factory, channel); } /** *
   * Allows clients to retrieve information about the ledger API version
   * 
*/ public static abstract class VersionServiceImplBase implements io.grpc.BindableService { /** *
     * Read the Ledger API version
     * 
*/ public void getLedgerApiVersion(com.daml.ledger.api.v1.VersionServiceOuterClass.GetLedgerApiVersionRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetLedgerApiVersionMethod(), responseObserver); } @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( getGetLedgerApiVersionMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< com.daml.ledger.api.v1.VersionServiceOuterClass.GetLedgerApiVersionRequest, com.daml.ledger.api.v1.VersionServiceOuterClass.GetLedgerApiVersionResponse>( this, METHODID_GET_LEDGER_API_VERSION))) .build(); } } /** *
   * Allows clients to retrieve information about the ledger API version
   * 
*/ public static final class VersionServiceStub extends io.grpc.stub.AbstractAsyncStub { private VersionServiceStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected VersionServiceStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new VersionServiceStub(channel, callOptions); } /** *
     * Read the Ledger API version
     * 
*/ public void getLedgerApiVersion(com.daml.ledger.api.v1.VersionServiceOuterClass.GetLedgerApiVersionRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getGetLedgerApiVersionMethod(), getCallOptions()), request, responseObserver); } } /** *
   * Allows clients to retrieve information about the ledger API version
   * 
*/ public static final class VersionServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub { private VersionServiceBlockingStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected VersionServiceBlockingStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new VersionServiceBlockingStub(channel, callOptions); } /** *
     * Read the Ledger API version
     * 
*/ public com.daml.ledger.api.v1.VersionServiceOuterClass.GetLedgerApiVersionResponse getLedgerApiVersion(com.daml.ledger.api.v1.VersionServiceOuterClass.GetLedgerApiVersionRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getGetLedgerApiVersionMethod(), getCallOptions(), request); } } /** *
   * Allows clients to retrieve information about the ledger API version
   * 
*/ public static final class VersionServiceFutureStub extends io.grpc.stub.AbstractFutureStub { private VersionServiceFutureStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected VersionServiceFutureStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new VersionServiceFutureStub(channel, callOptions); } /** *
     * Read the Ledger API version
     * 
*/ public com.google.common.util.concurrent.ListenableFuture getLedgerApiVersion( com.daml.ledger.api.v1.VersionServiceOuterClass.GetLedgerApiVersionRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getGetLedgerApiVersionMethod(), getCallOptions()), request); } } private static final int METHODID_GET_LEDGER_API_VERSION = 0; private static final 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 VersionServiceImplBase serviceImpl; private final int methodId; MethodHandlers(VersionServiceImplBase 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_LEDGER_API_VERSION: serviceImpl.getLedgerApiVersion((com.daml.ledger.api.v1.VersionServiceOuterClass.GetLedgerApiVersionRequest) 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(); } } } private static abstract class VersionServiceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { VersionServiceBaseDescriptorSupplier() {} @java.lang.Override public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { return com.daml.ledger.api.v1.VersionServiceOuterClass.getDescriptor(); } @java.lang.Override public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { return getFileDescriptor().findServiceByName("VersionService"); } } private static final class VersionServiceFileDescriptorSupplier extends VersionServiceBaseDescriptorSupplier { VersionServiceFileDescriptorSupplier() {} } private static final class VersionServiceMethodDescriptorSupplier extends VersionServiceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { private final String methodName; VersionServiceMethodDescriptorSupplier(String methodName) { this.methodName = methodName; } @java.lang.Override public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { return getServiceDescriptor().findMethodByName(methodName); } } private static volatile io.grpc.ServiceDescriptor serviceDescriptor; public static io.grpc.ServiceDescriptor getServiceDescriptor() { io.grpc.ServiceDescriptor result = serviceDescriptor; if (result == null) { synchronized (VersionServiceGrpc.class) { result = serviceDescriptor; if (result == null) { serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new VersionServiceFileDescriptorSupplier()) .addMethod(getGetLedgerApiVersionMethod()) .build(); } } } return result; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy