cn.herodotus.stirrup.grpc.user.GrpcHerodotusUserServiceGrpc Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of grpc-module-user Show documentation
Show all versions of grpc-module-user Show documentation
Herodotus 软件生态组件库GRPC用户定义模块
The newest version!
package cn.herodotus.stirrup.grpc.user;
import static io.grpc.MethodDescriptor.generateFullMethodName;
/**
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.59.1)",
comments = "Source: HerodotusUserService.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class GrpcHerodotusUserServiceGrpc {
private GrpcHerodotusUserServiceGrpc() {}
public static final java.lang.String SERVICE_NAME = "cn.herodotus.grpc.user.GrpcHerodotusUserService";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor getFindUserDetailsByUsernameMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "findUserDetailsByUsername",
requestType = cn.herodotus.stirrup.grpc.user.SignInRequest.class,
responseType = cn.herodotus.stirrup.grpc.user.GrpcHerodotusUser.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getFindUserDetailsByUsernameMethod() {
io.grpc.MethodDescriptor getFindUserDetailsByUsernameMethod;
if ((getFindUserDetailsByUsernameMethod = GrpcHerodotusUserServiceGrpc.getFindUserDetailsByUsernameMethod) == null) {
synchronized (GrpcHerodotusUserServiceGrpc.class) {
if ((getFindUserDetailsByUsernameMethod = GrpcHerodotusUserServiceGrpc.getFindUserDetailsByUsernameMethod) == null) {
GrpcHerodotusUserServiceGrpc.getFindUserDetailsByUsernameMethod = getFindUserDetailsByUsernameMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "findUserDetailsByUsername"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
cn.herodotus.stirrup.grpc.user.SignInRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
cn.herodotus.stirrup.grpc.user.GrpcHerodotusUser.getDefaultInstance()))
.setSchemaDescriptor(new GrpcHerodotusUserServiceMethodDescriptorSupplier("findUserDetailsByUsername"))
.build();
}
}
}
return getFindUserDetailsByUsernameMethod;
}
private static volatile io.grpc.MethodDescriptor getFindUserDetailsBySocialMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "findUserDetailsBySocial",
requestType = cn.herodotus.stirrup.grpc.user.SocialSignInRequest.class,
responseType = cn.herodotus.stirrup.grpc.user.GrpcHerodotusUser.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getFindUserDetailsBySocialMethod() {
io.grpc.MethodDescriptor getFindUserDetailsBySocialMethod;
if ((getFindUserDetailsBySocialMethod = GrpcHerodotusUserServiceGrpc.getFindUserDetailsBySocialMethod) == null) {
synchronized (GrpcHerodotusUserServiceGrpc.class) {
if ((getFindUserDetailsBySocialMethod = GrpcHerodotusUserServiceGrpc.getFindUserDetailsBySocialMethod) == null) {
GrpcHerodotusUserServiceGrpc.getFindUserDetailsBySocialMethod = getFindUserDetailsBySocialMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "findUserDetailsBySocial"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
cn.herodotus.stirrup.grpc.user.SocialSignInRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
cn.herodotus.stirrup.grpc.user.GrpcHerodotusUser.getDefaultInstance()))
.setSchemaDescriptor(new GrpcHerodotusUserServiceMethodDescriptorSupplier("findUserDetailsBySocial"))
.build();
}
}
}
return getFindUserDetailsBySocialMethod;
}
/**
* Creates a new async stub that supports all call types for the service
*/
public static GrpcHerodotusUserServiceStub newStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public GrpcHerodotusUserServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new GrpcHerodotusUserServiceStub(channel, callOptions);
}
};
return GrpcHerodotusUserServiceStub.newStub(factory, channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static GrpcHerodotusUserServiceBlockingStub newBlockingStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public GrpcHerodotusUserServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new GrpcHerodotusUserServiceBlockingStub(channel, callOptions);
}
};
return GrpcHerodotusUserServiceBlockingStub.newStub(factory, channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static GrpcHerodotusUserServiceFutureStub newFutureStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public GrpcHerodotusUserServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new GrpcHerodotusUserServiceFutureStub(channel, callOptions);
}
};
return GrpcHerodotusUserServiceFutureStub.newStub(factory, channel);
}
/**
*/
public interface AsyncService {
/**
*/
default void findUserDetailsByUsername(cn.herodotus.stirrup.grpc.user.SignInRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getFindUserDetailsByUsernameMethod(), responseObserver);
}
/**
*/
default void findUserDetailsBySocial(cn.herodotus.stirrup.grpc.user.SocialSignInRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getFindUserDetailsBySocialMethod(), responseObserver);
}
}
/**
* Base class for the server implementation of the service GrpcHerodotusUserService.
*/
public static abstract class GrpcHerodotusUserServiceImplBase
implements io.grpc.BindableService, AsyncService {
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return GrpcHerodotusUserServiceGrpc.bindService(this);
}
}
/**
* A stub to allow clients to do asynchronous rpc calls to service GrpcHerodotusUserService.
*/
public static final class GrpcHerodotusUserServiceStub
extends io.grpc.stub.AbstractAsyncStub {
private GrpcHerodotusUserServiceStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected GrpcHerodotusUserServiceStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new GrpcHerodotusUserServiceStub(channel, callOptions);
}
/**
*/
public void findUserDetailsByUsername(cn.herodotus.stirrup.grpc.user.SignInRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getFindUserDetailsByUsernameMethod(), getCallOptions()), request, responseObserver);
}
/**
*/
public void findUserDetailsBySocial(cn.herodotus.stirrup.grpc.user.SocialSignInRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getFindUserDetailsBySocialMethod(), getCallOptions()), request, responseObserver);
}
}
/**
* A stub to allow clients to do synchronous rpc calls to service GrpcHerodotusUserService.
*/
public static final class GrpcHerodotusUserServiceBlockingStub
extends io.grpc.stub.AbstractBlockingStub {
private GrpcHerodotusUserServiceBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected GrpcHerodotusUserServiceBlockingStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new GrpcHerodotusUserServiceBlockingStub(channel, callOptions);
}
/**
*/
public cn.herodotus.stirrup.grpc.user.GrpcHerodotusUser findUserDetailsByUsername(cn.herodotus.stirrup.grpc.user.SignInRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getFindUserDetailsByUsernameMethod(), getCallOptions(), request);
}
/**
*/
public cn.herodotus.stirrup.grpc.user.GrpcHerodotusUser findUserDetailsBySocial(cn.herodotus.stirrup.grpc.user.SocialSignInRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getFindUserDetailsBySocialMethod(), getCallOptions(), request);
}
}
/**
* A stub to allow clients to do ListenableFuture-style rpc calls to service GrpcHerodotusUserService.
*/
public static final class GrpcHerodotusUserServiceFutureStub
extends io.grpc.stub.AbstractFutureStub {
private GrpcHerodotusUserServiceFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected GrpcHerodotusUserServiceFutureStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new GrpcHerodotusUserServiceFutureStub(channel, callOptions);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture findUserDetailsByUsername(
cn.herodotus.stirrup.grpc.user.SignInRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getFindUserDetailsByUsernameMethod(), getCallOptions()), request);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture findUserDetailsBySocial(
cn.herodotus.stirrup.grpc.user.SocialSignInRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getFindUserDetailsBySocialMethod(), getCallOptions()), request);
}
}
private static final int METHODID_FIND_USER_DETAILS_BY_USERNAME = 0;
private static final int METHODID_FIND_USER_DETAILS_BY_SOCIAL = 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_FIND_USER_DETAILS_BY_USERNAME:
serviceImpl.findUserDetailsByUsername((cn.herodotus.stirrup.grpc.user.SignInRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_FIND_USER_DETAILS_BY_SOCIAL:
serviceImpl.findUserDetailsBySocial((cn.herodotus.stirrup.grpc.user.SocialSignInRequest) 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(
getFindUserDetailsByUsernameMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
cn.herodotus.stirrup.grpc.user.SignInRequest,
cn.herodotus.stirrup.grpc.user.GrpcHerodotusUser>(
service, METHODID_FIND_USER_DETAILS_BY_USERNAME)))
.addMethod(
getFindUserDetailsBySocialMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
cn.herodotus.stirrup.grpc.user.SocialSignInRequest,
cn.herodotus.stirrup.grpc.user.GrpcHerodotusUser>(
service, METHODID_FIND_USER_DETAILS_BY_SOCIAL)))
.build();
}
private static abstract class GrpcHerodotusUserServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
GrpcHerodotusUserServiceBaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return cn.herodotus.stirrup.grpc.user.GrpcHerodotusUserServiceProto.getDescriptor();
}
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("GrpcHerodotusUserService");
}
}
private static final class GrpcHerodotusUserServiceFileDescriptorSupplier
extends GrpcHerodotusUserServiceBaseDescriptorSupplier {
GrpcHerodotusUserServiceFileDescriptorSupplier() {}
}
private static final class GrpcHerodotusUserServiceMethodDescriptorSupplier
extends GrpcHerodotusUserServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final java.lang.String methodName;
GrpcHerodotusUserServiceMethodDescriptorSupplier(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 (GrpcHerodotusUserServiceGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new GrpcHerodotusUserServiceFileDescriptorSupplier())
.addMethod(getFindUserDetailsByUsernameMethod())
.addMethod(getFindUserDetailsBySocialMethod())
.build();
}
}
}
return result;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy