proto.tibc.core.packet.v1.MsgGrpc Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of irita-sdk Show documentation
Show all versions of irita-sdk Show documentation
Irita open alliance chain SDK (java)
package proto.tibc.core.packet.v1;
import static io.grpc.MethodDescriptor.generateFullMethodName;
/**
*
* Msg defines the tibc/packet Msg service.
*
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.35.0)",
comments = "Source: tibc/core/packet/v1/tx.proto")
public final class MsgGrpc {
private MsgGrpc() {}
public static final String SERVICE_NAME = "tibc.core.packet.v1.Msg";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor getRecvPacketMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "RecvPacket",
requestType = Tx.MsgRecvPacket.class,
responseType = Tx.MsgRecvPacketResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getRecvPacketMethod() {
io.grpc.MethodDescriptor getRecvPacketMethod;
if ((getRecvPacketMethod = MsgGrpc.getRecvPacketMethod) == null) {
synchronized (MsgGrpc.class) {
if ((getRecvPacketMethod = MsgGrpc.getRecvPacketMethod) == null) {
MsgGrpc.getRecvPacketMethod = getRecvPacketMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "RecvPacket"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
Tx.MsgRecvPacket.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
Tx.MsgRecvPacketResponse.getDefaultInstance()))
.setSchemaDescriptor(new MsgMethodDescriptorSupplier("RecvPacket"))
.build();
}
}
}
return getRecvPacketMethod;
}
private static volatile io.grpc.MethodDescriptor getAcknowledgementMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "Acknowledgement",
requestType = Tx.MsgAcknowledgement.class,
responseType = Tx.MsgAcknowledgementResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getAcknowledgementMethod() {
io.grpc.MethodDescriptor getAcknowledgementMethod;
if ((getAcknowledgementMethod = MsgGrpc.getAcknowledgementMethod) == null) {
synchronized (MsgGrpc.class) {
if ((getAcknowledgementMethod = MsgGrpc.getAcknowledgementMethod) == null) {
MsgGrpc.getAcknowledgementMethod = getAcknowledgementMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "Acknowledgement"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
Tx.MsgAcknowledgement.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
Tx.MsgAcknowledgementResponse.getDefaultInstance()))
.setSchemaDescriptor(new MsgMethodDescriptorSupplier("Acknowledgement"))
.build();
}
}
}
return getAcknowledgementMethod;
}
private static volatile io.grpc.MethodDescriptor getCleanPacketMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "CleanPacket",
requestType = Tx.MsgCleanPacket.class,
responseType = Tx.MsgCleanPacketResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getCleanPacketMethod() {
io.grpc.MethodDescriptor getCleanPacketMethod;
if ((getCleanPacketMethod = MsgGrpc.getCleanPacketMethod) == null) {
synchronized (MsgGrpc.class) {
if ((getCleanPacketMethod = MsgGrpc.getCleanPacketMethod) == null) {
MsgGrpc.getCleanPacketMethod = getCleanPacketMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "CleanPacket"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
Tx.MsgCleanPacket.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
Tx.MsgCleanPacketResponse.getDefaultInstance()))
.setSchemaDescriptor(new MsgMethodDescriptorSupplier("CleanPacket"))
.build();
}
}
}
return getCleanPacketMethod;
}
private static volatile io.grpc.MethodDescriptor getRecvCleanPacketMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "RecvCleanPacket",
requestType = Tx.MsgRecvCleanPacket.class,
responseType = Tx.MsgRecvCleanPacketResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getRecvCleanPacketMethod() {
io.grpc.MethodDescriptor getRecvCleanPacketMethod;
if ((getRecvCleanPacketMethod = MsgGrpc.getRecvCleanPacketMethod) == null) {
synchronized (MsgGrpc.class) {
if ((getRecvCleanPacketMethod = MsgGrpc.getRecvCleanPacketMethod) == null) {
MsgGrpc.getRecvCleanPacketMethod = getRecvCleanPacketMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "RecvCleanPacket"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
Tx.MsgRecvCleanPacket.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
Tx.MsgRecvCleanPacketResponse.getDefaultInstance()))
.setSchemaDescriptor(new MsgMethodDescriptorSupplier("RecvCleanPacket"))
.build();
}
}
}
return getRecvCleanPacketMethod;
}
/**
* Creates a new async stub that supports all call types for the service
*/
public static MsgStub newStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@Override
public MsgStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new MsgStub(channel, callOptions);
}
};
return MsgStub.newStub(factory, channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static MsgBlockingStub newBlockingStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@Override
public MsgBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new MsgBlockingStub(channel, callOptions);
}
};
return MsgBlockingStub.newStub(factory, channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static MsgFutureStub newFutureStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@Override
public MsgFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new MsgFutureStub(channel, callOptions);
}
};
return MsgFutureStub.newStub(factory, channel);
}
/**
*
* Msg defines the tibc/packet Msg service.
*
*/
public static abstract class MsgImplBase implements io.grpc.BindableService {
/**
*
* RecvPacket defines a rpc handler method for MsgRecvPacket.
*
*/
public void recvPacket(Tx.MsgRecvPacket request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRecvPacketMethod(), responseObserver);
}
/**
*
* Acknowledgement defines a rpc handler method for MsgAcknowledgement.
*
*/
public void acknowledgement(Tx.MsgAcknowledgement request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAcknowledgementMethod(), responseObserver);
}
/**
*
* CleanPacket defines a rpc handler method for MsgCleanPacket.
*
*/
public void cleanPacket(Tx.MsgCleanPacket request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCleanPacketMethod(), responseObserver);
}
/**
*
* RecvCleanPacket defines a rpc handler method for MsgRecvCleanPacket.
*
*/
public void recvCleanPacket(Tx.MsgRecvCleanPacket request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRecvCleanPacketMethod(), responseObserver);
}
@Override public final io.grpc.ServerServiceDefinition bindService() {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
getRecvPacketMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
Tx.MsgRecvPacket,
Tx.MsgRecvPacketResponse>(
this, METHODID_RECV_PACKET)))
.addMethod(
getAcknowledgementMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
Tx.MsgAcknowledgement,
Tx.MsgAcknowledgementResponse>(
this, METHODID_ACKNOWLEDGEMENT)))
.addMethod(
getCleanPacketMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
Tx.MsgCleanPacket,
Tx.MsgCleanPacketResponse>(
this, METHODID_CLEAN_PACKET)))
.addMethod(
getRecvCleanPacketMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
Tx.MsgRecvCleanPacket,
Tx.MsgRecvCleanPacketResponse>(
this, METHODID_RECV_CLEAN_PACKET)))
.build();
}
}
/**
*
* Msg defines the tibc/packet Msg service.
*
*/
public static final class MsgStub extends io.grpc.stub.AbstractAsyncStub {
private MsgStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@Override
protected MsgStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new MsgStub(channel, callOptions);
}
/**
*
* RecvPacket defines a rpc handler method for MsgRecvPacket.
*
*/
public void recvPacket(Tx.MsgRecvPacket request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getRecvPacketMethod(), getCallOptions()), request, responseObserver);
}
/**
*
* Acknowledgement defines a rpc handler method for MsgAcknowledgement.
*
*/
public void acknowledgement(Tx.MsgAcknowledgement request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getAcknowledgementMethod(), getCallOptions()), request, responseObserver);
}
/**
*
* CleanPacket defines a rpc handler method for MsgCleanPacket.
*
*/
public void cleanPacket(Tx.MsgCleanPacket request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getCleanPacketMethod(), getCallOptions()), request, responseObserver);
}
/**
*
* RecvCleanPacket defines a rpc handler method for MsgRecvCleanPacket.
*
*/
public void recvCleanPacket(Tx.MsgRecvCleanPacket request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getRecvCleanPacketMethod(), getCallOptions()), request, responseObserver);
}
}
/**
*
* Msg defines the tibc/packet Msg service.
*
*/
public static final class MsgBlockingStub extends io.grpc.stub.AbstractBlockingStub {
private MsgBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@Override
protected MsgBlockingStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new MsgBlockingStub(channel, callOptions);
}
/**
*
* RecvPacket defines a rpc handler method for MsgRecvPacket.
*
*/
public Tx.MsgRecvPacketResponse recvPacket(Tx.MsgRecvPacket request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getRecvPacketMethod(), getCallOptions(), request);
}
/**
*
* Acknowledgement defines a rpc handler method for MsgAcknowledgement.
*
*/
public Tx.MsgAcknowledgementResponse acknowledgement(Tx.MsgAcknowledgement request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getAcknowledgementMethod(), getCallOptions(), request);
}
/**
*
* CleanPacket defines a rpc handler method for MsgCleanPacket.
*
*/
public Tx.MsgCleanPacketResponse cleanPacket(Tx.MsgCleanPacket request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getCleanPacketMethod(), getCallOptions(), request);
}
/**
*
* RecvCleanPacket defines a rpc handler method for MsgRecvCleanPacket.
*
*/
public Tx.MsgRecvCleanPacketResponse recvCleanPacket(Tx.MsgRecvCleanPacket request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getRecvCleanPacketMethod(), getCallOptions(), request);
}
}
/**
*
* Msg defines the tibc/packet Msg service.
*
*/
public static final class MsgFutureStub extends io.grpc.stub.AbstractFutureStub {
private MsgFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@Override
protected MsgFutureStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new MsgFutureStub(channel, callOptions);
}
/**
*
* RecvPacket defines a rpc handler method for MsgRecvPacket.
*
*/
public com.google.common.util.concurrent.ListenableFuture recvPacket(
Tx.MsgRecvPacket request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getRecvPacketMethod(), getCallOptions()), request);
}
/**
*
* Acknowledgement defines a rpc handler method for MsgAcknowledgement.
*
*/
public com.google.common.util.concurrent.ListenableFuture acknowledgement(
Tx.MsgAcknowledgement request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getAcknowledgementMethod(), getCallOptions()), request);
}
/**
*
* CleanPacket defines a rpc handler method for MsgCleanPacket.
*
*/
public com.google.common.util.concurrent.ListenableFuture cleanPacket(
Tx.MsgCleanPacket request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getCleanPacketMethod(), getCallOptions()), request);
}
/**
*
* RecvCleanPacket defines a rpc handler method for MsgRecvCleanPacket.
*
*/
public com.google.common.util.concurrent.ListenableFuture recvCleanPacket(
Tx.MsgRecvCleanPacket request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getRecvCleanPacketMethod(), getCallOptions()), request);
}
}
private static final int METHODID_RECV_PACKET = 0;
private static final int METHODID_ACKNOWLEDGEMENT = 1;
private static final int METHODID_CLEAN_PACKET = 2;
private static final int METHODID_RECV_CLEAN_PACKET = 3;
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 MsgImplBase serviceImpl;
private final int methodId;
MethodHandlers(MsgImplBase serviceImpl, int methodId) {
this.serviceImpl = serviceImpl;
this.methodId = methodId;
}
@Override
@SuppressWarnings("unchecked")
public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) {
switch (methodId) {
case METHODID_RECV_PACKET:
serviceImpl.recvPacket((Tx.MsgRecvPacket) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_ACKNOWLEDGEMENT:
serviceImpl.acknowledgement((Tx.MsgAcknowledgement) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_CLEAN_PACKET:
serviceImpl.cleanPacket((Tx.MsgCleanPacket) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_RECV_CLEAN_PACKET:
serviceImpl.recvCleanPacket((Tx.MsgRecvCleanPacket) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
default:
throw new AssertionError();
}
}
@Override
@SuppressWarnings("unchecked")
public io.grpc.stub.StreamObserver invoke(
io.grpc.stub.StreamObserver responseObserver) {
switch (methodId) {
default:
throw new AssertionError();
}
}
}
private static abstract class MsgBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
MsgBaseDescriptorSupplier() {}
@Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return Tx.getDescriptor();
}
@Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("Msg");
}
}
private static final class MsgFileDescriptorSupplier
extends MsgBaseDescriptorSupplier {
MsgFileDescriptorSupplier() {}
}
private static final class MsgMethodDescriptorSupplier
extends MsgBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final String methodName;
MsgMethodDescriptorSupplier(String methodName) {
this.methodName = methodName;
}
@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 (MsgGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new MsgFileDescriptorSupplier())
.addMethod(getRecvPacketMethod())
.addMethod(getAcknowledgementMethod())
.addMethod(getCleanPacketMethod())
.addMethod(getRecvCleanPacketMethod())
.build();
}
}
}
return result;
}
}