com.craxiom.messaging.grpc.ConnectionHandshakeGrpc Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of network-survey-messaging Show documentation
Show all versions of network-survey-messaging Show documentation
Protobuf and gRPC stubs for sending Wireless Protocol Survey messages'
package com.craxiom.messaging.grpc;
import static io.grpc.MethodDescriptor.generateFullMethodName;
/**
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.65.1)",
comments = "Source: com/craxiom/messaging/grpc/connection_handshake.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class ConnectionHandshakeGrpc {
private ConnectionHandshakeGrpc() {}
public static final java.lang.String SERVICE_NAME = "com.craxiom.messaging.grpc.ConnectionHandshake";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor getStartConnectionMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "StartConnection",
requestType = com.craxiom.messaging.grpc.ConnectionRequest.class,
responseType = com.craxiom.messaging.grpc.ConnectionReply.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getStartConnectionMethod() {
io.grpc.MethodDescriptor getStartConnectionMethod;
if ((getStartConnectionMethod = ConnectionHandshakeGrpc.getStartConnectionMethod) == null) {
synchronized (ConnectionHandshakeGrpc.class) {
if ((getStartConnectionMethod = ConnectionHandshakeGrpc.getStartConnectionMethod) == null) {
ConnectionHandshakeGrpc.getStartConnectionMethod = getStartConnectionMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "StartConnection"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.craxiom.messaging.grpc.ConnectionRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.craxiom.messaging.grpc.ConnectionReply.getDefaultInstance()))
.setSchemaDescriptor(new ConnectionHandshakeMethodDescriptorSupplier("StartConnection"))
.build();
}
}
}
return getStartConnectionMethod;
}
/**
* Creates a new async stub that supports all call types for the service
*/
public static ConnectionHandshakeStub newStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public ConnectionHandshakeStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ConnectionHandshakeStub(channel, callOptions);
}
};
return ConnectionHandshakeStub.newStub(factory, channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static ConnectionHandshakeBlockingStub newBlockingStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public ConnectionHandshakeBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ConnectionHandshakeBlockingStub(channel, callOptions);
}
};
return ConnectionHandshakeBlockingStub.newStub(factory, channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static ConnectionHandshakeFutureStub newFutureStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public ConnectionHandshakeFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ConnectionHandshakeFutureStub(channel, callOptions);
}
};
return ConnectionHandshakeFutureStub.newStub(factory, channel);
}
/**
*/
public interface AsyncService {
/**
*/
default void startConnection(com.craxiom.messaging.grpc.ConnectionRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getStartConnectionMethod(), responseObserver);
}
}
/**
* Base class for the server implementation of the service ConnectionHandshake.
*/
public static abstract class ConnectionHandshakeImplBase
implements io.grpc.BindableService, AsyncService {
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return ConnectionHandshakeGrpc.bindService(this);
}
}
/**
* A stub to allow clients to do asynchronous rpc calls to service ConnectionHandshake.
*/
public static final class ConnectionHandshakeStub
extends io.grpc.stub.AbstractAsyncStub {
private ConnectionHandshakeStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected ConnectionHandshakeStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ConnectionHandshakeStub(channel, callOptions);
}
/**
*/
public void startConnection(com.craxiom.messaging.grpc.ConnectionRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getStartConnectionMethod(), getCallOptions()), request, responseObserver);
}
}
/**
* A stub to allow clients to do synchronous rpc calls to service ConnectionHandshake.
*/
public static final class ConnectionHandshakeBlockingStub
extends io.grpc.stub.AbstractBlockingStub {
private ConnectionHandshakeBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected ConnectionHandshakeBlockingStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ConnectionHandshakeBlockingStub(channel, callOptions);
}
/**
*/
public com.craxiom.messaging.grpc.ConnectionReply startConnection(com.craxiom.messaging.grpc.ConnectionRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getStartConnectionMethod(), getCallOptions(), request);
}
}
/**
* A stub to allow clients to do ListenableFuture-style rpc calls to service ConnectionHandshake.
*/
public static final class ConnectionHandshakeFutureStub
extends io.grpc.stub.AbstractFutureStub {
private ConnectionHandshakeFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected ConnectionHandshakeFutureStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ConnectionHandshakeFutureStub(channel, callOptions);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture startConnection(
com.craxiom.messaging.grpc.ConnectionRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getStartConnectionMethod(), getCallOptions()), request);
}
}
private static final int METHODID_START_CONNECTION = 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_START_CONNECTION:
serviceImpl.startConnection((com.craxiom.messaging.grpc.ConnectionRequest) 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(
getStartConnectionMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.craxiom.messaging.grpc.ConnectionRequest,
com.craxiom.messaging.grpc.ConnectionReply>(
service, METHODID_START_CONNECTION)))
.build();
}
private static abstract class ConnectionHandshakeBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
ConnectionHandshakeBaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return com.craxiom.messaging.grpc.ConnectionHandshakeOuterClass.getDescriptor();
}
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("ConnectionHandshake");
}
}
private static final class ConnectionHandshakeFileDescriptorSupplier
extends ConnectionHandshakeBaseDescriptorSupplier {
ConnectionHandshakeFileDescriptorSupplier() {}
}
private static final class ConnectionHandshakeMethodDescriptorSupplier
extends ConnectionHandshakeBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final java.lang.String methodName;
ConnectionHandshakeMethodDescriptorSupplier(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 (ConnectionHandshakeGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new ConnectionHandshakeFileDescriptorSupplier())
.addMethod(getStartConnectionMethod())
.build();
}
}
}
return result;
}
}