main.grpc.com.streamlayer.pushNotification.client.ClientGrpc 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.client;
import static io.grpc.MethodDescriptor.generateFullMethodName;
/**
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.65.1)",
comments = "Source: streamlayer/pushNotification/client/pushNotification.client.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class ClientGrpc {
private ClientGrpc() {}
public static final java.lang.String SERVICE_NAME = "streamlayer.pushNotification.client.Client";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor getRegisterMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "Register",
requestType = com.streamlayer.pushNotification.client.RegisterRequest.class,
responseType = com.streamlayer.pushNotification.client.RegisterResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getRegisterMethod() {
io.grpc.MethodDescriptor getRegisterMethod;
if ((getRegisterMethod = ClientGrpc.getRegisterMethod) == null) {
synchronized (ClientGrpc.class) {
if ((getRegisterMethod = ClientGrpc.getRegisterMethod) == null) {
ClientGrpc.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.client.RegisterRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
com.streamlayer.pushNotification.client.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.client.RemoveRequest.class,
responseType = com.streamlayer.pushNotification.client.RemoveResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getRemoveMethod() {
io.grpc.MethodDescriptor getRemoveMethod;
if ((getRemoveMethod = ClientGrpc.getRemoveMethod) == null) {
synchronized (ClientGrpc.class) {
if ((getRemoveMethod = ClientGrpc.getRemoveMethod) == null) {
ClientGrpc.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.client.RemoveRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
com.streamlayer.pushNotification.client.RemoveResponse.getDefaultInstance()))
.build();
}
}
}
return getRemoveMethod;
}
/**
* Creates a new async stub that supports all call types for the service
*/
public static ClientStub newStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public ClientStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ClientStub(channel, callOptions);
}
};
return ClientStub.newStub(factory, channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static ClientBlockingStub newBlockingStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public ClientBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ClientBlockingStub(channel, callOptions);
}
};
return ClientBlockingStub.newStub(factory, channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static ClientFutureStub newFutureStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public ClientFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ClientFutureStub(channel, callOptions);
}
};
return ClientFutureStub.newStub(factory, channel);
}
/**
*/
public interface AsyncService {
/**
*/
default void register(com.streamlayer.pushNotification.client.RegisterRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRegisterMethod(), responseObserver);
}
/**
*/
default void remove(com.streamlayer.pushNotification.client.RemoveRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRemoveMethod(), responseObserver);
}
}
/**
* Base class for the server implementation of the service Client.
*/
public static abstract class ClientImplBase
implements io.grpc.BindableService, AsyncService {
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return ClientGrpc.bindService(this);
}
}
/**
* A stub to allow clients to do asynchronous rpc calls to service Client.
*/
public static final class ClientStub
extends io.grpc.stub.AbstractAsyncStub {
private ClientStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected ClientStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ClientStub(channel, callOptions);
}
/**
*/
public void register(com.streamlayer.pushNotification.client.RegisterRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getRegisterMethod(), getCallOptions()), request, responseObserver);
}
/**
*/
public void remove(com.streamlayer.pushNotification.client.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 Client.
*/
public static final class ClientBlockingStub
extends io.grpc.stub.AbstractBlockingStub {
private ClientBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected ClientBlockingStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ClientBlockingStub(channel, callOptions);
}
/**
*/
public com.streamlayer.pushNotification.client.RegisterResponse register(com.streamlayer.pushNotification.client.RegisterRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getRegisterMethod(), getCallOptions(), request);
}
/**
*/
public com.streamlayer.pushNotification.client.RemoveResponse remove(com.streamlayer.pushNotification.client.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 Client.
*/
public static final class ClientFutureStub
extends io.grpc.stub.AbstractFutureStub {
private ClientFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected ClientFutureStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ClientFutureStub(channel, callOptions);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture register(
com.streamlayer.pushNotification.client.RegisterRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getRegisterMethod(), getCallOptions()), request);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture remove(
com.streamlayer.pushNotification.client.RemoveRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getRemoveMethod(), getCallOptions()), request);
}
}
private static final int METHODID_REGISTER = 0;
private static final int METHODID_REMOVE = 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_REGISTER:
serviceImpl.register((com.streamlayer.pushNotification.client.RegisterRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_REMOVE:
serviceImpl.remove((com.streamlayer.pushNotification.client.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(
getRegisterMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.streamlayer.pushNotification.client.RegisterRequest,
com.streamlayer.pushNotification.client.RegisterResponse>(
service, METHODID_REGISTER)))
.addMethod(
getRemoveMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.streamlayer.pushNotification.client.RemoveRequest,
com.streamlayer.pushNotification.client.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 (ClientGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.addMethod(getRegisterMethod())
.addMethod(getRemoveMethod())
.build();
}
}
}
return result;
}
}