
com.daml.ledger.api.v2.EventQueryServiceGrpc Maven / Gradle / Ivy
package com.daml.ledger.api.v2;
import static io.grpc.MethodDescriptor.generateFullMethodName;
/**
*
* Query events by contract id.
* Note that querying by contract key is not (yet) supported, as contract keys
* are not supported (yet) in multi-domain scenarios.
*
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler",
comments = "Source: com/daml/ledger/api/v2/event_query_service.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class EventQueryServiceGrpc {
private EventQueryServiceGrpc() {}
public static final String SERVICE_NAME = "com.daml.ledger.api.v2.EventQueryService";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor getGetEventsByContractIdMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "GetEventsByContractId",
requestType = com.daml.ledger.api.v1.EventQueryServiceOuterClass.GetEventsByContractIdRequest.class,
responseType = com.daml.ledger.api.v2.EventQueryServiceOuterClass.GetEventsByContractIdResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getGetEventsByContractIdMethod() {
io.grpc.MethodDescriptor getGetEventsByContractIdMethod;
if ((getGetEventsByContractIdMethod = EventQueryServiceGrpc.getGetEventsByContractIdMethod) == null) {
synchronized (EventQueryServiceGrpc.class) {
if ((getGetEventsByContractIdMethod = EventQueryServiceGrpc.getGetEventsByContractIdMethod) == null) {
EventQueryServiceGrpc.getGetEventsByContractIdMethod = getGetEventsByContractIdMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetEventsByContractId"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.daml.ledger.api.v1.EventQueryServiceOuterClass.GetEventsByContractIdRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.daml.ledger.api.v2.EventQueryServiceOuterClass.GetEventsByContractIdResponse.getDefaultInstance()))
.setSchemaDescriptor(new EventQueryServiceMethodDescriptorSupplier("GetEventsByContractId"))
.build();
}
}
}
return getGetEventsByContractIdMethod;
}
/**
* Creates a new async stub that supports all call types for the service
*/
public static EventQueryServiceStub newStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public EventQueryServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new EventQueryServiceStub(channel, callOptions);
}
};
return EventQueryServiceStub.newStub(factory, channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static EventQueryServiceBlockingStub newBlockingStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public EventQueryServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new EventQueryServiceBlockingStub(channel, callOptions);
}
};
return EventQueryServiceBlockingStub.newStub(factory, channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static EventQueryServiceFutureStub newFutureStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public EventQueryServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new EventQueryServiceFutureStub(channel, callOptions);
}
};
return EventQueryServiceFutureStub.newStub(factory, channel);
}
/**
*
* Query events by contract id.
* Note that querying by contract key is not (yet) supported, as contract keys
* are not supported (yet) in multi-domain scenarios.
*
*/
public static abstract class EventQueryServiceImplBase implements io.grpc.BindableService {
/**
*
* Get the create and the consuming exercise event for the contract with the provided ID.
* No events will be returned for contracts that have been pruned because they
* have already been archived before the latest pruning offset.
*
*/
public void getEventsByContractId(com.daml.ledger.api.v1.EventQueryServiceOuterClass.GetEventsByContractIdRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetEventsByContractIdMethod(), responseObserver);
}
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
getGetEventsByContractIdMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.daml.ledger.api.v1.EventQueryServiceOuterClass.GetEventsByContractIdRequest,
com.daml.ledger.api.v2.EventQueryServiceOuterClass.GetEventsByContractIdResponse>(
this, METHODID_GET_EVENTS_BY_CONTRACT_ID)))
.build();
}
}
/**
*
* Query events by contract id.
* Note that querying by contract key is not (yet) supported, as contract keys
* are not supported (yet) in multi-domain scenarios.
*
*/
public static final class EventQueryServiceStub extends io.grpc.stub.AbstractAsyncStub {
private EventQueryServiceStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected EventQueryServiceStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new EventQueryServiceStub(channel, callOptions);
}
/**
*
* Get the create and the consuming exercise event for the contract with the provided ID.
* No events will be returned for contracts that have been pruned because they
* have already been archived before the latest pruning offset.
*
*/
public void getEventsByContractId(com.daml.ledger.api.v1.EventQueryServiceOuterClass.GetEventsByContractIdRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getGetEventsByContractIdMethod(), getCallOptions()), request, responseObserver);
}
}
/**
*
* Query events by contract id.
* Note that querying by contract key is not (yet) supported, as contract keys
* are not supported (yet) in multi-domain scenarios.
*
*/
public static final class EventQueryServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub {
private EventQueryServiceBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected EventQueryServiceBlockingStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new EventQueryServiceBlockingStub(channel, callOptions);
}
/**
*
* Get the create and the consuming exercise event for the contract with the provided ID.
* No events will be returned for contracts that have been pruned because they
* have already been archived before the latest pruning offset.
*
*/
public com.daml.ledger.api.v2.EventQueryServiceOuterClass.GetEventsByContractIdResponse getEventsByContractId(com.daml.ledger.api.v1.EventQueryServiceOuterClass.GetEventsByContractIdRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getGetEventsByContractIdMethod(), getCallOptions(), request);
}
}
/**
*
* Query events by contract id.
* Note that querying by contract key is not (yet) supported, as contract keys
* are not supported (yet) in multi-domain scenarios.
*
*/
public static final class EventQueryServiceFutureStub extends io.grpc.stub.AbstractFutureStub {
private EventQueryServiceFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected EventQueryServiceFutureStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new EventQueryServiceFutureStub(channel, callOptions);
}
/**
*
* Get the create and the consuming exercise event for the contract with the provided ID.
* No events will be returned for contracts that have been pruned because they
* have already been archived before the latest pruning offset.
*
*/
public com.google.common.util.concurrent.ListenableFuture getEventsByContractId(
com.daml.ledger.api.v1.EventQueryServiceOuterClass.GetEventsByContractIdRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getGetEventsByContractIdMethod(), getCallOptions()), request);
}
}
private static final int METHODID_GET_EVENTS_BY_CONTRACT_ID = 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 EventQueryServiceImplBase serviceImpl;
private final int methodId;
MethodHandlers(EventQueryServiceImplBase 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_EVENTS_BY_CONTRACT_ID:
serviceImpl.getEventsByContractId((com.daml.ledger.api.v1.EventQueryServiceOuterClass.GetEventsByContractIdRequest) 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 EventQueryServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
EventQueryServiceBaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return com.daml.ledger.api.v2.EventQueryServiceOuterClass.getDescriptor();
}
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("EventQueryService");
}
}
private static final class EventQueryServiceFileDescriptorSupplier
extends EventQueryServiceBaseDescriptorSupplier {
EventQueryServiceFileDescriptorSupplier() {}
}
private static final class EventQueryServiceMethodDescriptorSupplier
extends EventQueryServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final String methodName;
EventQueryServiceMethodDescriptorSupplier(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 (EventQueryServiceGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new EventQueryServiceFileDescriptorSupplier())
.addMethod(getGetEventsByContractIdMethod())
.build();
}
}
}
return result;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy