main.grpc.com.streamlayer.pushNotification.admin.AdminGrpc Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sl-protofiles Show documentation
Show all versions of sl-protofiles Show documentation
StreamLayer Java Protofiles
package com.streamlayer.pushNotification.admin;
import static io.grpc.MethodDescriptor.generateFullMethodName;
/**
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.65.1)",
comments = "Source: streamlayer/pushNotification/admin/pushNotification.admin.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class AdminGrpc {
private AdminGrpc() {}
public static final java.lang.String SERVICE_NAME = "streamlayer.pushNotification.admin.Admin";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor getGetMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "Get",
requestType = com.streamlayer.pushNotification.admin.GetRequest.class,
responseType = com.streamlayer.pushNotification.admin.GetResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getGetMethod() {
io.grpc.MethodDescriptor getGetMethod;
if ((getGetMethod = AdminGrpc.getGetMethod) == null) {
synchronized (AdminGrpc.class) {
if ((getGetMethod = AdminGrpc.getGetMethod) == null) {
AdminGrpc.getGetMethod = getGetMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "Get"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
com.streamlayer.pushNotification.admin.GetRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
com.streamlayer.pushNotification.admin.GetResponse.getDefaultInstance()))
.build();
}
}
}
return getGetMethod;
}
private static volatile io.grpc.MethodDescriptor getRegisterMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "Register",
requestType = com.streamlayer.pushNotification.admin.RegisterRequest.class,
responseType = com.streamlayer.pushNotification.admin.RegisterResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getRegisterMethod() {
io.grpc.MethodDescriptor getRegisterMethod;
if ((getRegisterMethod = AdminGrpc.getRegisterMethod) == null) {
synchronized (AdminGrpc.class) {
if ((getRegisterMethod = AdminGrpc.getRegisterMethod) == null) {
AdminGrpc.getRegisterMethod = getRegisterMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "Register"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
com.streamlayer.pushNotification.admin.RegisterRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
com.streamlayer.pushNotification.admin.RegisterResponse.getDefaultInstance()))
.build();
}
}
}
return getRegisterMethod;
}
private static volatile io.grpc.MethodDescriptor getRemoveMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "Remove",
requestType = com.streamlayer.pushNotification.admin.RemoveRequest.class,
responseType = com.streamlayer.pushNotification.admin.RemoveResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getRemoveMethod() {
io.grpc.MethodDescriptor getRemoveMethod;
if ((getRemoveMethod = AdminGrpc.getRemoveMethod) == null) {
synchronized (AdminGrpc.class) {
if ((getRemoveMethod = AdminGrpc.getRemoveMethod) == null) {
AdminGrpc.getRemoveMethod = getRemoveMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "Remove"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
com.streamlayer.pushNotification.admin.RemoveRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
com.streamlayer.pushNotification.admin.RemoveResponse.getDefaultInstance()))
.build();
}
}
}
return getRemoveMethod;
}
/**
* Creates a new async stub that supports all call types for the service
*/
public static AdminStub newStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public AdminStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new AdminStub(channel, callOptions);
}
};
return AdminStub.newStub(factory, channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static AdminBlockingStub newBlockingStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public AdminBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new AdminBlockingStub(channel, callOptions);
}
};
return AdminBlockingStub.newStub(factory, channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static AdminFutureStub newFutureStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public AdminFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new AdminFutureStub(channel, callOptions);
}
};
return AdminFutureStub.newStub(factory, channel);
}
/**
*/
public interface AsyncService {
/**
*/
default void get(com.streamlayer.pushNotification.admin.GetRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetMethod(), responseObserver);
}
/**
*/
default void register(com.streamlayer.pushNotification.admin.RegisterRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRegisterMethod(), responseObserver);
}
/**
*/
default void remove(com.streamlayer.pushNotification.admin.RemoveRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRemoveMethod(), responseObserver);
}
}
/**
* Base class for the server implementation of the service Admin.
*/
public static abstract class AdminImplBase
implements io.grpc.BindableService, AsyncService {
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return AdminGrpc.bindService(this);
}
}
/**
* A stub to allow clients to do asynchronous rpc calls to service Admin.
*/
public static final class AdminStub
extends io.grpc.stub.AbstractAsyncStub {
private AdminStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected AdminStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new AdminStub(channel, callOptions);
}
/**
*/
public void get(com.streamlayer.pushNotification.admin.GetRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getGetMethod(), getCallOptions()), request, responseObserver);
}
/**
*/
public void register(com.streamlayer.pushNotification.admin.RegisterRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getRegisterMethod(), getCallOptions()), request, responseObserver);
}
/**
*/
public void remove(com.streamlayer.pushNotification.admin.RemoveRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getRemoveMethod(), getCallOptions()), request, responseObserver);
}
}
/**
* A stub to allow clients to do synchronous rpc calls to service Admin.
*/
public static final class AdminBlockingStub
extends io.grpc.stub.AbstractBlockingStub {
private AdminBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected AdminBlockingStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new AdminBlockingStub(channel, callOptions);
}
/**
*/
public com.streamlayer.pushNotification.admin.GetResponse get(com.streamlayer.pushNotification.admin.GetRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getGetMethod(), getCallOptions(), request);
}
/**
*/
public com.streamlayer.pushNotification.admin.RegisterResponse register(com.streamlayer.pushNotification.admin.RegisterRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getRegisterMethod(), getCallOptions(), request);
}
/**
*/
public com.streamlayer.pushNotification.admin.RemoveResponse remove(com.streamlayer.pushNotification.admin.RemoveRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getRemoveMethod(), getCallOptions(), request);
}
}
/**
* A stub to allow clients to do ListenableFuture-style rpc calls to service Admin.
*/
public static final class AdminFutureStub
extends io.grpc.stub.AbstractFutureStub {
private AdminFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected AdminFutureStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new AdminFutureStub(channel, callOptions);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture get(
com.streamlayer.pushNotification.admin.GetRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getGetMethod(), getCallOptions()), request);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture register(
com.streamlayer.pushNotification.admin.RegisterRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getRegisterMethod(), getCallOptions()), request);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture remove(
com.streamlayer.pushNotification.admin.RemoveRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getRemoveMethod(), getCallOptions()), request);
}
}
private static final int METHODID_GET = 0;
private static final int METHODID_REGISTER = 1;
private static final int METHODID_REMOVE = 2;
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_GET:
serviceImpl.get((com.streamlayer.pushNotification.admin.GetRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_REGISTER:
serviceImpl.register((com.streamlayer.pushNotification.admin.RegisterRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_REMOVE:
serviceImpl.remove((com.streamlayer.pushNotification.admin.RemoveRequest) 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(
getGetMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.streamlayer.pushNotification.admin.GetRequest,
com.streamlayer.pushNotification.admin.GetResponse>(
service, METHODID_GET)))
.addMethod(
getRegisterMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.streamlayer.pushNotification.admin.RegisterRequest,
com.streamlayer.pushNotification.admin.RegisterResponse>(
service, METHODID_REGISTER)))
.addMethod(
getRemoveMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.streamlayer.pushNotification.admin.RemoveRequest,
com.streamlayer.pushNotification.admin.RemoveResponse>(
service, METHODID_REMOVE)))
.build();
}
private static volatile io.grpc.ServiceDescriptor serviceDescriptor;
public static io.grpc.ServiceDescriptor getServiceDescriptor() {
io.grpc.ServiceDescriptor result = serviceDescriptor;
if (result == null) {
synchronized (AdminGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.addMethod(getGetMethod())
.addMethod(getRegisterMethod())
.addMethod(getRemoveMethod())
.build();
}
}
}
return result;
}
}