io.dapr.v1.AppCallbackAlphaGrpc Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dapr-sdk-autogen Show documentation
Show all versions of dapr-sdk-autogen Show documentation
Auto-generated SDK for Dapr
package io.dapr.v1;
import static io.grpc.MethodDescriptor.generateFullMethodName;
/**
*
* AppCallbackAlpha V1 is an optional extension to AppCallback V1 to opt
* for Alpha RPCs.
*
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.64.0)",
comments = "Source: dapr/proto/runtime/v1/appcallback.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class AppCallbackAlphaGrpc {
private AppCallbackAlphaGrpc() {}
public static final java.lang.String SERVICE_NAME = "dapr.proto.runtime.v1.AppCallbackAlpha";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor getOnBulkTopicEventAlpha1Method;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "OnBulkTopicEventAlpha1",
requestType = io.dapr.v1.DaprAppCallbackProtos.TopicEventBulkRequest.class,
responseType = io.dapr.v1.DaprAppCallbackProtos.TopicEventBulkResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getOnBulkTopicEventAlpha1Method() {
io.grpc.MethodDescriptor getOnBulkTopicEventAlpha1Method;
if ((getOnBulkTopicEventAlpha1Method = AppCallbackAlphaGrpc.getOnBulkTopicEventAlpha1Method) == null) {
synchronized (AppCallbackAlphaGrpc.class) {
if ((getOnBulkTopicEventAlpha1Method = AppCallbackAlphaGrpc.getOnBulkTopicEventAlpha1Method) == null) {
AppCallbackAlphaGrpc.getOnBulkTopicEventAlpha1Method = getOnBulkTopicEventAlpha1Method =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "OnBulkTopicEventAlpha1"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.dapr.v1.DaprAppCallbackProtos.TopicEventBulkRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.dapr.v1.DaprAppCallbackProtos.TopicEventBulkResponse.getDefaultInstance()))
.setSchemaDescriptor(new AppCallbackAlphaMethodDescriptorSupplier("OnBulkTopicEventAlpha1"))
.build();
}
}
}
return getOnBulkTopicEventAlpha1Method;
}
private static volatile io.grpc.MethodDescriptor getOnJobEventAlpha1Method;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "OnJobEventAlpha1",
requestType = io.dapr.v1.DaprAppCallbackProtos.JobEventRequest.class,
responseType = io.dapr.v1.DaprAppCallbackProtos.JobEventResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getOnJobEventAlpha1Method() {
io.grpc.MethodDescriptor getOnJobEventAlpha1Method;
if ((getOnJobEventAlpha1Method = AppCallbackAlphaGrpc.getOnJobEventAlpha1Method) == null) {
synchronized (AppCallbackAlphaGrpc.class) {
if ((getOnJobEventAlpha1Method = AppCallbackAlphaGrpc.getOnJobEventAlpha1Method) == null) {
AppCallbackAlphaGrpc.getOnJobEventAlpha1Method = getOnJobEventAlpha1Method =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "OnJobEventAlpha1"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.dapr.v1.DaprAppCallbackProtos.JobEventRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.dapr.v1.DaprAppCallbackProtos.JobEventResponse.getDefaultInstance()))
.setSchemaDescriptor(new AppCallbackAlphaMethodDescriptorSupplier("OnJobEventAlpha1"))
.build();
}
}
}
return getOnJobEventAlpha1Method;
}
/**
* Creates a new async stub that supports all call types for the service
*/
public static AppCallbackAlphaStub newStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public AppCallbackAlphaStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new AppCallbackAlphaStub(channel, callOptions);
}
};
return AppCallbackAlphaStub.newStub(factory, channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static AppCallbackAlphaBlockingStub newBlockingStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public AppCallbackAlphaBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new AppCallbackAlphaBlockingStub(channel, callOptions);
}
};
return AppCallbackAlphaBlockingStub.newStub(factory, channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static AppCallbackAlphaFutureStub newFutureStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public AppCallbackAlphaFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new AppCallbackAlphaFutureStub(channel, callOptions);
}
};
return AppCallbackAlphaFutureStub.newStub(factory, channel);
}
/**
*
* AppCallbackAlpha V1 is an optional extension to AppCallback V1 to opt
* for Alpha RPCs.
*
*/
public interface AsyncService {
/**
*
* Subscribes bulk events from Pubsub
*
*/
default void onBulkTopicEventAlpha1(io.dapr.v1.DaprAppCallbackProtos.TopicEventBulkRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getOnBulkTopicEventAlpha1Method(), responseObserver);
}
/**
*
* Sends job back to the app's endpoint at trigger time.
*
*/
default void onJobEventAlpha1(io.dapr.v1.DaprAppCallbackProtos.JobEventRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getOnJobEventAlpha1Method(), responseObserver);
}
}
/**
* Base class for the server implementation of the service AppCallbackAlpha.
*
* AppCallbackAlpha V1 is an optional extension to AppCallback V1 to opt
* for Alpha RPCs.
*
*/
public static abstract class AppCallbackAlphaImplBase
implements io.grpc.BindableService, AsyncService {
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return AppCallbackAlphaGrpc.bindService(this);
}
}
/**
* A stub to allow clients to do asynchronous rpc calls to service AppCallbackAlpha.
*
* AppCallbackAlpha V1 is an optional extension to AppCallback V1 to opt
* for Alpha RPCs.
*
*/
public static final class AppCallbackAlphaStub
extends io.grpc.stub.AbstractAsyncStub {
private AppCallbackAlphaStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected AppCallbackAlphaStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new AppCallbackAlphaStub(channel, callOptions);
}
/**
*
* Subscribes bulk events from Pubsub
*
*/
public void onBulkTopicEventAlpha1(io.dapr.v1.DaprAppCallbackProtos.TopicEventBulkRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getOnBulkTopicEventAlpha1Method(), getCallOptions()), request, responseObserver);
}
/**
*
* Sends job back to the app's endpoint at trigger time.
*
*/
public void onJobEventAlpha1(io.dapr.v1.DaprAppCallbackProtos.JobEventRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getOnJobEventAlpha1Method(), getCallOptions()), request, responseObserver);
}
}
/**
* A stub to allow clients to do synchronous rpc calls to service AppCallbackAlpha.
*
* AppCallbackAlpha V1 is an optional extension to AppCallback V1 to opt
* for Alpha RPCs.
*
*/
public static final class AppCallbackAlphaBlockingStub
extends io.grpc.stub.AbstractBlockingStub {
private AppCallbackAlphaBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected AppCallbackAlphaBlockingStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new AppCallbackAlphaBlockingStub(channel, callOptions);
}
/**
*
* Subscribes bulk events from Pubsub
*
*/
public io.dapr.v1.DaprAppCallbackProtos.TopicEventBulkResponse onBulkTopicEventAlpha1(io.dapr.v1.DaprAppCallbackProtos.TopicEventBulkRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getOnBulkTopicEventAlpha1Method(), getCallOptions(), request);
}
/**
*
* Sends job back to the app's endpoint at trigger time.
*
*/
public io.dapr.v1.DaprAppCallbackProtos.JobEventResponse onJobEventAlpha1(io.dapr.v1.DaprAppCallbackProtos.JobEventRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getOnJobEventAlpha1Method(), getCallOptions(), request);
}
}
/**
* A stub to allow clients to do ListenableFuture-style rpc calls to service AppCallbackAlpha.
*
* AppCallbackAlpha V1 is an optional extension to AppCallback V1 to opt
* for Alpha RPCs.
*
*/
public static final class AppCallbackAlphaFutureStub
extends io.grpc.stub.AbstractFutureStub {
private AppCallbackAlphaFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected AppCallbackAlphaFutureStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new AppCallbackAlphaFutureStub(channel, callOptions);
}
/**
*
* Subscribes bulk events from Pubsub
*
*/
public com.google.common.util.concurrent.ListenableFuture onBulkTopicEventAlpha1(
io.dapr.v1.DaprAppCallbackProtos.TopicEventBulkRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getOnBulkTopicEventAlpha1Method(), getCallOptions()), request);
}
/**
*
* Sends job back to the app's endpoint at trigger time.
*
*/
public com.google.common.util.concurrent.ListenableFuture onJobEventAlpha1(
io.dapr.v1.DaprAppCallbackProtos.JobEventRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getOnJobEventAlpha1Method(), getCallOptions()), request);
}
}
private static final int METHODID_ON_BULK_TOPIC_EVENT_ALPHA1 = 0;
private static final int METHODID_ON_JOB_EVENT_ALPHA1 = 1;
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 AsyncService serviceImpl;
private final int methodId;
MethodHandlers(AsyncService 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_ON_BULK_TOPIC_EVENT_ALPHA1:
serviceImpl.onBulkTopicEventAlpha1((io.dapr.v1.DaprAppCallbackProtos.TopicEventBulkRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_ON_JOB_EVENT_ALPHA1:
serviceImpl.onJobEventAlpha1((io.dapr.v1.DaprAppCallbackProtos.JobEventRequest) 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 final io.grpc.ServerServiceDefinition bindService(AsyncService service) {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
getOnBulkTopicEventAlpha1Method(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
io.dapr.v1.DaprAppCallbackProtos.TopicEventBulkRequest,
io.dapr.v1.DaprAppCallbackProtos.TopicEventBulkResponse>(
service, METHODID_ON_BULK_TOPIC_EVENT_ALPHA1)))
.addMethod(
getOnJobEventAlpha1Method(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
io.dapr.v1.DaprAppCallbackProtos.JobEventRequest,
io.dapr.v1.DaprAppCallbackProtos.JobEventResponse>(
service, METHODID_ON_JOB_EVENT_ALPHA1)))
.build();
}
private static abstract class AppCallbackAlphaBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
AppCallbackAlphaBaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return io.dapr.v1.DaprAppCallbackProtos.getDescriptor();
}
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("AppCallbackAlpha");
}
}
private static final class AppCallbackAlphaFileDescriptorSupplier
extends AppCallbackAlphaBaseDescriptorSupplier {
AppCallbackAlphaFileDescriptorSupplier() {}
}
private static final class AppCallbackAlphaMethodDescriptorSupplier
extends AppCallbackAlphaBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final java.lang.String methodName;
AppCallbackAlphaMethodDescriptorSupplier(java.lang.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 (AppCallbackAlphaGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new AppCallbackAlphaFileDescriptorSupplier())
.addMethod(getOnBulkTopicEventAlpha1Method())
.addMethod(getOnJobEventAlpha1Method())
.build();
}
}
}
return result;
}
}