
com.daml.ledger.api.v2.PackageServiceGrpc Maven / Gradle / Ivy
package com.daml.ledger.api.v2;
import static io.grpc.MethodDescriptor.generateFullMethodName;
/**
*
* Allows clients to query the Daml-LF packages that are supported by the server.
*
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler",
comments = "Source: com/daml/ledger/api/v2/package_service.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class PackageServiceGrpc {
private PackageServiceGrpc() {}
public static final String SERVICE_NAME = "com.daml.ledger.api.v2.PackageService";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor getListPackagesMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "ListPackages",
requestType = com.daml.ledger.api.v2.PackageServiceOuterClass.ListPackagesRequest.class,
responseType = com.daml.ledger.api.v1.PackageServiceOuterClass.ListPackagesResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getListPackagesMethod() {
io.grpc.MethodDescriptor getListPackagesMethod;
if ((getListPackagesMethod = PackageServiceGrpc.getListPackagesMethod) == null) {
synchronized (PackageServiceGrpc.class) {
if ((getListPackagesMethod = PackageServiceGrpc.getListPackagesMethod) == null) {
PackageServiceGrpc.getListPackagesMethod = getListPackagesMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListPackages"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.daml.ledger.api.v2.PackageServiceOuterClass.ListPackagesRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.daml.ledger.api.v1.PackageServiceOuterClass.ListPackagesResponse.getDefaultInstance()))
.setSchemaDescriptor(new PackageServiceMethodDescriptorSupplier("ListPackages"))
.build();
}
}
}
return getListPackagesMethod;
}
private static volatile io.grpc.MethodDescriptor getGetPackageMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "GetPackage",
requestType = com.daml.ledger.api.v2.PackageServiceOuterClass.GetPackageRequest.class,
responseType = com.daml.ledger.api.v1.PackageServiceOuterClass.GetPackageResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getGetPackageMethod() {
io.grpc.MethodDescriptor getGetPackageMethod;
if ((getGetPackageMethod = PackageServiceGrpc.getGetPackageMethod) == null) {
synchronized (PackageServiceGrpc.class) {
if ((getGetPackageMethod = PackageServiceGrpc.getGetPackageMethod) == null) {
PackageServiceGrpc.getGetPackageMethod = getGetPackageMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetPackage"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.daml.ledger.api.v2.PackageServiceOuterClass.GetPackageRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.daml.ledger.api.v1.PackageServiceOuterClass.GetPackageResponse.getDefaultInstance()))
.setSchemaDescriptor(new PackageServiceMethodDescriptorSupplier("GetPackage"))
.build();
}
}
}
return getGetPackageMethod;
}
private static volatile io.grpc.MethodDescriptor getGetPackageStatusMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "GetPackageStatus",
requestType = com.daml.ledger.api.v2.PackageServiceOuterClass.GetPackageStatusRequest.class,
responseType = com.daml.ledger.api.v1.PackageServiceOuterClass.GetPackageStatusResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getGetPackageStatusMethod() {
io.grpc.MethodDescriptor getGetPackageStatusMethod;
if ((getGetPackageStatusMethod = PackageServiceGrpc.getGetPackageStatusMethod) == null) {
synchronized (PackageServiceGrpc.class) {
if ((getGetPackageStatusMethod = PackageServiceGrpc.getGetPackageStatusMethod) == null) {
PackageServiceGrpc.getGetPackageStatusMethod = getGetPackageStatusMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetPackageStatus"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.daml.ledger.api.v2.PackageServiceOuterClass.GetPackageStatusRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.daml.ledger.api.v1.PackageServiceOuterClass.GetPackageStatusResponse.getDefaultInstance()))
.setSchemaDescriptor(new PackageServiceMethodDescriptorSupplier("GetPackageStatus"))
.build();
}
}
}
return getGetPackageStatusMethod;
}
/**
* Creates a new async stub that supports all call types for the service
*/
public static PackageServiceStub newStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public PackageServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new PackageServiceStub(channel, callOptions);
}
};
return PackageServiceStub.newStub(factory, channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static PackageServiceBlockingStub newBlockingStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public PackageServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new PackageServiceBlockingStub(channel, callOptions);
}
};
return PackageServiceBlockingStub.newStub(factory, channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static PackageServiceFutureStub newFutureStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public PackageServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new PackageServiceFutureStub(channel, callOptions);
}
};
return PackageServiceFutureStub.newStub(factory, channel);
}
/**
*
* Allows clients to query the Daml-LF packages that are supported by the server.
*
*/
public static abstract class PackageServiceImplBase implements io.grpc.BindableService {
/**
*
* Returns the identifiers of all supported packages.
*
*/
public void listPackages(com.daml.ledger.api.v2.PackageServiceOuterClass.ListPackagesRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListPackagesMethod(), responseObserver);
}
/**
*
* Returns the contents of a single package.
*
*/
public void getPackage(com.daml.ledger.api.v2.PackageServiceOuterClass.GetPackageRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetPackageMethod(), responseObserver);
}
/**
*
* Returns the status of a single package.
*
*/
public void getPackageStatus(com.daml.ledger.api.v2.PackageServiceOuterClass.GetPackageStatusRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetPackageStatusMethod(), responseObserver);
}
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
getListPackagesMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.daml.ledger.api.v2.PackageServiceOuterClass.ListPackagesRequest,
com.daml.ledger.api.v1.PackageServiceOuterClass.ListPackagesResponse>(
this, METHODID_LIST_PACKAGES)))
.addMethod(
getGetPackageMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.daml.ledger.api.v2.PackageServiceOuterClass.GetPackageRequest,
com.daml.ledger.api.v1.PackageServiceOuterClass.GetPackageResponse>(
this, METHODID_GET_PACKAGE)))
.addMethod(
getGetPackageStatusMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.daml.ledger.api.v2.PackageServiceOuterClass.GetPackageStatusRequest,
com.daml.ledger.api.v1.PackageServiceOuterClass.GetPackageStatusResponse>(
this, METHODID_GET_PACKAGE_STATUS)))
.build();
}
}
/**
*
* Allows clients to query the Daml-LF packages that are supported by the server.
*
*/
public static final class PackageServiceStub extends io.grpc.stub.AbstractAsyncStub {
private PackageServiceStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected PackageServiceStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new PackageServiceStub(channel, callOptions);
}
/**
*
* Returns the identifiers of all supported packages.
*
*/
public void listPackages(com.daml.ledger.api.v2.PackageServiceOuterClass.ListPackagesRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getListPackagesMethod(), getCallOptions()), request, responseObserver);
}
/**
*
* Returns the contents of a single package.
*
*/
public void getPackage(com.daml.ledger.api.v2.PackageServiceOuterClass.GetPackageRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getGetPackageMethod(), getCallOptions()), request, responseObserver);
}
/**
*
* Returns the status of a single package.
*
*/
public void getPackageStatus(com.daml.ledger.api.v2.PackageServiceOuterClass.GetPackageStatusRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getGetPackageStatusMethod(), getCallOptions()), request, responseObserver);
}
}
/**
*
* Allows clients to query the Daml-LF packages that are supported by the server.
*
*/
public static final class PackageServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub {
private PackageServiceBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected PackageServiceBlockingStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new PackageServiceBlockingStub(channel, callOptions);
}
/**
*
* Returns the identifiers of all supported packages.
*
*/
public com.daml.ledger.api.v1.PackageServiceOuterClass.ListPackagesResponse listPackages(com.daml.ledger.api.v2.PackageServiceOuterClass.ListPackagesRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getListPackagesMethod(), getCallOptions(), request);
}
/**
*
* Returns the contents of a single package.
*
*/
public com.daml.ledger.api.v1.PackageServiceOuterClass.GetPackageResponse getPackage(com.daml.ledger.api.v2.PackageServiceOuterClass.GetPackageRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getGetPackageMethod(), getCallOptions(), request);
}
/**
*
* Returns the status of a single package.
*
*/
public com.daml.ledger.api.v1.PackageServiceOuterClass.GetPackageStatusResponse getPackageStatus(com.daml.ledger.api.v2.PackageServiceOuterClass.GetPackageStatusRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getGetPackageStatusMethod(), getCallOptions(), request);
}
}
/**
*
* Allows clients to query the Daml-LF packages that are supported by the server.
*
*/
public static final class PackageServiceFutureStub extends io.grpc.stub.AbstractFutureStub {
private PackageServiceFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected PackageServiceFutureStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new PackageServiceFutureStub(channel, callOptions);
}
/**
*
* Returns the identifiers of all supported packages.
*
*/
public com.google.common.util.concurrent.ListenableFuture listPackages(
com.daml.ledger.api.v2.PackageServiceOuterClass.ListPackagesRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getListPackagesMethod(), getCallOptions()), request);
}
/**
*
* Returns the contents of a single package.
*
*/
public com.google.common.util.concurrent.ListenableFuture getPackage(
com.daml.ledger.api.v2.PackageServiceOuterClass.GetPackageRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getGetPackageMethod(), getCallOptions()), request);
}
/**
*
* Returns the status of a single package.
*
*/
public com.google.common.util.concurrent.ListenableFuture getPackageStatus(
com.daml.ledger.api.v2.PackageServiceOuterClass.GetPackageStatusRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getGetPackageStatusMethod(), getCallOptions()), request);
}
}
private static final int METHODID_LIST_PACKAGES = 0;
private static final int METHODID_GET_PACKAGE = 1;
private static final int METHODID_GET_PACKAGE_STATUS = 2;
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 PackageServiceImplBase serviceImpl;
private final int methodId;
MethodHandlers(PackageServiceImplBase 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_LIST_PACKAGES:
serviceImpl.listPackages((com.daml.ledger.api.v2.PackageServiceOuterClass.ListPackagesRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_GET_PACKAGE:
serviceImpl.getPackage((com.daml.ledger.api.v2.PackageServiceOuterClass.GetPackageRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_GET_PACKAGE_STATUS:
serviceImpl.getPackageStatus((com.daml.ledger.api.v2.PackageServiceOuterClass.GetPackageStatusRequest) 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 PackageServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
PackageServiceBaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return com.daml.ledger.api.v2.PackageServiceOuterClass.getDescriptor();
}
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("PackageService");
}
}
private static final class PackageServiceFileDescriptorSupplier
extends PackageServiceBaseDescriptorSupplier {
PackageServiceFileDescriptorSupplier() {}
}
private static final class PackageServiceMethodDescriptorSupplier
extends PackageServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final String methodName;
PackageServiceMethodDescriptorSupplier(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 (PackageServiceGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new PackageServiceFileDescriptorSupplier())
.addMethod(getListPackagesMethod())
.addMethod(getGetPackageMethod())
.addMethod(getGetPackageStatusMethod())
.build();
}
}
}
return result;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy