com.microsoft.durabletask.implementation.protobuf.TaskHubWorkerServiceGrpc Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of durabletask-client Show documentation
Show all versions of durabletask-client Show documentation
This package contains classes and interfaces for building Durable Task orchestrations in Java.
package com.microsoft.durabletask.implementation.protobuf;
import static io.grpc.MethodDescriptor.generateFullMethodName;
/**
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.46.0)",
comments = "Source: orchestrator_service.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class TaskHubWorkerServiceGrpc {
private TaskHubWorkerServiceGrpc() {}
public static final String SERVICE_NAME = "TaskHubWorkerService";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor getExecuteOrchestratorMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "ExecuteOrchestrator",
requestType = com.microsoft.durabletask.implementation.protobuf.OrchestratorService.OrchestratorRequest.class,
responseType = com.microsoft.durabletask.implementation.protobuf.OrchestratorService.OrchestratorResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getExecuteOrchestratorMethod() {
io.grpc.MethodDescriptor getExecuteOrchestratorMethod;
if ((getExecuteOrchestratorMethod = TaskHubWorkerServiceGrpc.getExecuteOrchestratorMethod) == null) {
synchronized (TaskHubWorkerServiceGrpc.class) {
if ((getExecuteOrchestratorMethod = TaskHubWorkerServiceGrpc.getExecuteOrchestratorMethod) == null) {
TaskHubWorkerServiceGrpc.getExecuteOrchestratorMethod = getExecuteOrchestratorMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "ExecuteOrchestrator"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.microsoft.durabletask.implementation.protobuf.OrchestratorService.OrchestratorRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.microsoft.durabletask.implementation.protobuf.OrchestratorService.OrchestratorResponse.getDefaultInstance()))
.setSchemaDescriptor(new TaskHubWorkerServiceMethodDescriptorSupplier("ExecuteOrchestrator"))
.build();
}
}
}
return getExecuteOrchestratorMethod;
}
private static volatile io.grpc.MethodDescriptor getExecuteActivityMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "ExecuteActivity",
requestType = com.microsoft.durabletask.implementation.protobuf.OrchestratorService.ActivityRequest.class,
responseType = com.microsoft.durabletask.implementation.protobuf.OrchestratorService.ActivityResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getExecuteActivityMethod() {
io.grpc.MethodDescriptor getExecuteActivityMethod;
if ((getExecuteActivityMethod = TaskHubWorkerServiceGrpc.getExecuteActivityMethod) == null) {
synchronized (TaskHubWorkerServiceGrpc.class) {
if ((getExecuteActivityMethod = TaskHubWorkerServiceGrpc.getExecuteActivityMethod) == null) {
TaskHubWorkerServiceGrpc.getExecuteActivityMethod = getExecuteActivityMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "ExecuteActivity"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.microsoft.durabletask.implementation.protobuf.OrchestratorService.ActivityRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.microsoft.durabletask.implementation.protobuf.OrchestratorService.ActivityResponse.getDefaultInstance()))
.setSchemaDescriptor(new TaskHubWorkerServiceMethodDescriptorSupplier("ExecuteActivity"))
.build();
}
}
}
return getExecuteActivityMethod;
}
/**
* Creates a new async stub that supports all call types for the service
*/
public static TaskHubWorkerServiceStub newStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public TaskHubWorkerServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new TaskHubWorkerServiceStub(channel, callOptions);
}
};
return TaskHubWorkerServiceStub.newStub(factory, channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static TaskHubWorkerServiceBlockingStub newBlockingStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public TaskHubWorkerServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new TaskHubWorkerServiceBlockingStub(channel, callOptions);
}
};
return TaskHubWorkerServiceBlockingStub.newStub(factory, channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static TaskHubWorkerServiceFutureStub newFutureStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public TaskHubWorkerServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new TaskHubWorkerServiceFutureStub(channel, callOptions);
}
};
return TaskHubWorkerServiceFutureStub.newStub(factory, channel);
}
/**
*/
public static abstract class TaskHubWorkerServiceImplBase implements io.grpc.BindableService {
/**
*/
public void executeOrchestrator(com.microsoft.durabletask.implementation.protobuf.OrchestratorService.OrchestratorRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getExecuteOrchestratorMethod(), responseObserver);
}
/**
*/
public void executeActivity(com.microsoft.durabletask.implementation.protobuf.OrchestratorService.ActivityRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getExecuteActivityMethod(), responseObserver);
}
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
getExecuteOrchestratorMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.microsoft.durabletask.implementation.protobuf.OrchestratorService.OrchestratorRequest,
com.microsoft.durabletask.implementation.protobuf.OrchestratorService.OrchestratorResponse>(
this, METHODID_EXECUTE_ORCHESTRATOR)))
.addMethod(
getExecuteActivityMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.microsoft.durabletask.implementation.protobuf.OrchestratorService.ActivityRequest,
com.microsoft.durabletask.implementation.protobuf.OrchestratorService.ActivityResponse>(
this, METHODID_EXECUTE_ACTIVITY)))
.build();
}
}
/**
*/
public static final class TaskHubWorkerServiceStub extends io.grpc.stub.AbstractAsyncStub {
private TaskHubWorkerServiceStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected TaskHubWorkerServiceStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new TaskHubWorkerServiceStub(channel, callOptions);
}
/**
*/
public void executeOrchestrator(com.microsoft.durabletask.implementation.protobuf.OrchestratorService.OrchestratorRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getExecuteOrchestratorMethod(), getCallOptions()), request, responseObserver);
}
/**
*/
public void executeActivity(com.microsoft.durabletask.implementation.protobuf.OrchestratorService.ActivityRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getExecuteActivityMethod(), getCallOptions()), request, responseObserver);
}
}
/**
*/
public static final class TaskHubWorkerServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub {
private TaskHubWorkerServiceBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected TaskHubWorkerServiceBlockingStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new TaskHubWorkerServiceBlockingStub(channel, callOptions);
}
/**
*/
public com.microsoft.durabletask.implementation.protobuf.OrchestratorService.OrchestratorResponse executeOrchestrator(com.microsoft.durabletask.implementation.protobuf.OrchestratorService.OrchestratorRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getExecuteOrchestratorMethod(), getCallOptions(), request);
}
/**
*/
public com.microsoft.durabletask.implementation.protobuf.OrchestratorService.ActivityResponse executeActivity(com.microsoft.durabletask.implementation.protobuf.OrchestratorService.ActivityRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getExecuteActivityMethod(), getCallOptions(), request);
}
}
/**
*/
public static final class TaskHubWorkerServiceFutureStub extends io.grpc.stub.AbstractFutureStub {
private TaskHubWorkerServiceFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected TaskHubWorkerServiceFutureStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new TaskHubWorkerServiceFutureStub(channel, callOptions);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture executeOrchestrator(
com.microsoft.durabletask.implementation.protobuf.OrchestratorService.OrchestratorRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getExecuteOrchestratorMethod(), getCallOptions()), request);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture executeActivity(
com.microsoft.durabletask.implementation.protobuf.OrchestratorService.ActivityRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getExecuteActivityMethod(), getCallOptions()), request);
}
}
private static final int METHODID_EXECUTE_ORCHESTRATOR = 0;
private static final int METHODID_EXECUTE_ACTIVITY = 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 TaskHubWorkerServiceImplBase serviceImpl;
private final int methodId;
MethodHandlers(TaskHubWorkerServiceImplBase 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_EXECUTE_ORCHESTRATOR:
serviceImpl.executeOrchestrator((com.microsoft.durabletask.implementation.protobuf.OrchestratorService.OrchestratorRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_EXECUTE_ACTIVITY:
serviceImpl.executeActivity((com.microsoft.durabletask.implementation.protobuf.OrchestratorService.ActivityRequest) 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 TaskHubWorkerServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
TaskHubWorkerServiceBaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return com.microsoft.durabletask.implementation.protobuf.OrchestratorService.getDescriptor();
}
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("TaskHubWorkerService");
}
}
private static final class TaskHubWorkerServiceFileDescriptorSupplier
extends TaskHubWorkerServiceBaseDescriptorSupplier {
TaskHubWorkerServiceFileDescriptorSupplier() {}
}
private static final class TaskHubWorkerServiceMethodDescriptorSupplier
extends TaskHubWorkerServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final String methodName;
TaskHubWorkerServiceMethodDescriptorSupplier(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 (TaskHubWorkerServiceGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new TaskHubWorkerServiceFileDescriptorSupplier())
.addMethod(getExecuteOrchestratorMethod())
.addMethod(getExecuteActivityMethod())
.build();
}
}
}
return result;
}
}