shade.polaris.io.grpc.lookup.v1.RouteLookupServiceGrpc Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of polaris-all Show documentation
Show all versions of polaris-all Show documentation
All in one project for polaris-java
The newest version!
package io.grpc.lookup.v1;
import static io.grpc.MethodDescriptor.generateFullMethodName;
/**
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler",
comments = "Source: grpc/lookup/v1/rls.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class RouteLookupServiceGrpc {
private RouteLookupServiceGrpc() {}
public static final java.lang.String SERVICE_NAME = "grpc.lookup.v1.RouteLookupService";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor getRouteLookupMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "RouteLookup",
requestType = io.grpc.lookup.v1.RouteLookupRequest.class,
responseType = io.grpc.lookup.v1.RouteLookupResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getRouteLookupMethod() {
io.grpc.MethodDescriptor getRouteLookupMethod;
if ((getRouteLookupMethod = RouteLookupServiceGrpc.getRouteLookupMethod) == null) {
synchronized (RouteLookupServiceGrpc.class) {
if ((getRouteLookupMethod = RouteLookupServiceGrpc.getRouteLookupMethod) == null) {
RouteLookupServiceGrpc.getRouteLookupMethod = getRouteLookupMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "RouteLookup"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.grpc.lookup.v1.RouteLookupRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.grpc.lookup.v1.RouteLookupResponse.getDefaultInstance()))
.setSchemaDescriptor(new RouteLookupServiceMethodDescriptorSupplier("RouteLookup"))
.build();
}
}
}
return getRouteLookupMethod;
}
/**
* Creates a new async stub that supports all call types for the service
*/
public static RouteLookupServiceStub newStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public RouteLookupServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new RouteLookupServiceStub(channel, callOptions);
}
};
return RouteLookupServiceStub.newStub(factory, channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static RouteLookupServiceBlockingStub newBlockingStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public RouteLookupServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new RouteLookupServiceBlockingStub(channel, callOptions);
}
};
return RouteLookupServiceBlockingStub.newStub(factory, channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static RouteLookupServiceFutureStub newFutureStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public RouteLookupServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new RouteLookupServiceFutureStub(channel, callOptions);
}
};
return RouteLookupServiceFutureStub.newStub(factory, channel);
}
/**
*/
public interface AsyncService {
/**
*
* Lookup returns a target for a single key.
*
*/
default void routeLookup(io.grpc.lookup.v1.RouteLookupRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRouteLookupMethod(), responseObserver);
}
}
/**
* Base class for the server implementation of the service RouteLookupService.
*/
public static abstract class RouteLookupServiceImplBase
implements io.grpc.BindableService, AsyncService {
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return RouteLookupServiceGrpc.bindService(this);
}
}
/**
* A stub to allow clients to do asynchronous rpc calls to service RouteLookupService.
*/
public static final class RouteLookupServiceStub
extends io.grpc.stub.AbstractAsyncStub {
private RouteLookupServiceStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected RouteLookupServiceStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new RouteLookupServiceStub(channel, callOptions);
}
/**
*
* Lookup returns a target for a single key.
*
*/
public void routeLookup(io.grpc.lookup.v1.RouteLookupRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getRouteLookupMethod(), getCallOptions()), request, responseObserver);
}
}
/**
* A stub to allow clients to do synchronous rpc calls to service RouteLookupService.
*/
public static final class RouteLookupServiceBlockingStub
extends io.grpc.stub.AbstractBlockingStub {
private RouteLookupServiceBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected RouteLookupServiceBlockingStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new RouteLookupServiceBlockingStub(channel, callOptions);
}
/**
*
* Lookup returns a target for a single key.
*
*/
public io.grpc.lookup.v1.RouteLookupResponse routeLookup(io.grpc.lookup.v1.RouteLookupRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getRouteLookupMethod(), getCallOptions(), request);
}
}
/**
* A stub to allow clients to do ListenableFuture-style rpc calls to service RouteLookupService.
*/
public static final class RouteLookupServiceFutureStub
extends io.grpc.stub.AbstractFutureStub {
private RouteLookupServiceFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected RouteLookupServiceFutureStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new RouteLookupServiceFutureStub(channel, callOptions);
}
/**
*
* Lookup returns a target for a single key.
*
*/
public com.google.common.util.concurrent.ListenableFuture routeLookup(
io.grpc.lookup.v1.RouteLookupRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getRouteLookupMethod(), getCallOptions()), request);
}
}
private static final int METHODID_ROUTE_LOOKUP = 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 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_ROUTE_LOOKUP:
serviceImpl.routeLookup((io.grpc.lookup.v1.RouteLookupRequest) 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(
getRouteLookupMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
io.grpc.lookup.v1.RouteLookupRequest,
io.grpc.lookup.v1.RouteLookupResponse>(
service, METHODID_ROUTE_LOOKUP)))
.build();
}
private static abstract class RouteLookupServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
RouteLookupServiceBaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return io.grpc.lookup.v1.RlsProto.getDescriptor();
}
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("RouteLookupService");
}
}
private static final class RouteLookupServiceFileDescriptorSupplier
extends RouteLookupServiceBaseDescriptorSupplier {
RouteLookupServiceFileDescriptorSupplier() {}
}
private static final class RouteLookupServiceMethodDescriptorSupplier
extends RouteLookupServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final java.lang.String methodName;
RouteLookupServiceMethodDescriptorSupplier(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 (RouteLookupServiceGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new RouteLookupServiceFileDescriptorSupplier())
.addMethod(getRouteLookupMethod())
.build();
}
}
}
return result;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy