org.hyperledger.fabric.protos.peer.ChaincodeSupportGrpc Maven / Gradle / Ivy
package org.hyperledger.fabric.protos.peer;
import static io.grpc.MethodDescriptor.generateFullMethodName;
/**
*
* Interface that provides support to chaincode execution. ChaincodeContext
* provides the context necessary for the server to respond appropriately.
*
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.68.0)",
comments = "Source: peer/chaincode_shim.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class ChaincodeSupportGrpc {
private ChaincodeSupportGrpc() {}
public static final java.lang.String SERVICE_NAME = "protos.ChaincodeSupport";
// 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 = org.hyperledger.fabric.protos.peer.ChaincodeMessage.class,
responseType = org.hyperledger.fabric.protos.peer.ChaincodeMessage.class,
methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
public static io.grpc.MethodDescriptor getRegisterMethod() {
io.grpc.MethodDescriptor getRegisterMethod;
if ((getRegisterMethod = ChaincodeSupportGrpc.getRegisterMethod) == null) {
synchronized (ChaincodeSupportGrpc.class) {
if ((getRegisterMethod = ChaincodeSupportGrpc.getRegisterMethod) == null) {
ChaincodeSupportGrpc.getRegisterMethod = getRegisterMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "Register"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
org.hyperledger.fabric.protos.peer.ChaincodeMessage.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
org.hyperledger.fabric.protos.peer.ChaincodeMessage.getDefaultInstance()))
.setSchemaDescriptor(new ChaincodeSupportMethodDescriptorSupplier("Register"))
.build();
}
}
}
return getRegisterMethod;
}
/**
* Creates a new async stub that supports all call types for the service
*/
public static ChaincodeSupportStub newStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public ChaincodeSupportStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ChaincodeSupportStub(channel, callOptions);
}
};
return ChaincodeSupportStub.newStub(factory, channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static ChaincodeSupportBlockingStub newBlockingStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public ChaincodeSupportBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ChaincodeSupportBlockingStub(channel, callOptions);
}
};
return ChaincodeSupportBlockingStub.newStub(factory, channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static ChaincodeSupportFutureStub newFutureStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public ChaincodeSupportFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ChaincodeSupportFutureStub(channel, callOptions);
}
};
return ChaincodeSupportFutureStub.newStub(factory, channel);
}
/**
*
* Interface that provides support to chaincode execution. ChaincodeContext
* provides the context necessary for the server to respond appropriately.
*
*/
public interface AsyncService {
/**
*/
default io.grpc.stub.StreamObserver register(
io.grpc.stub.StreamObserver responseObserver) {
return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall(getRegisterMethod(), responseObserver);
}
}
/**
* Base class for the server implementation of the service ChaincodeSupport.
*
* Interface that provides support to chaincode execution. ChaincodeContext
* provides the context necessary for the server to respond appropriately.
*
*/
public static abstract class ChaincodeSupportImplBase
implements io.grpc.BindableService, AsyncService {
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return ChaincodeSupportGrpc.bindService(this);
}
}
/**
* A stub to allow clients to do asynchronous rpc calls to service ChaincodeSupport.
*
* Interface that provides support to chaincode execution. ChaincodeContext
* provides the context necessary for the server to respond appropriately.
*
*/
public static final class ChaincodeSupportStub
extends io.grpc.stub.AbstractAsyncStub {
private ChaincodeSupportStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected ChaincodeSupportStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ChaincodeSupportStub(channel, callOptions);
}
/**
*/
public io.grpc.stub.StreamObserver register(
io.grpc.stub.StreamObserver responseObserver) {
return io.grpc.stub.ClientCalls.asyncBidiStreamingCall(
getChannel().newCall(getRegisterMethod(), getCallOptions()), responseObserver);
}
}
/**
* A stub to allow clients to do synchronous rpc calls to service ChaincodeSupport.
*
* Interface that provides support to chaincode execution. ChaincodeContext
* provides the context necessary for the server to respond appropriately.
*
*/
public static final class ChaincodeSupportBlockingStub
extends io.grpc.stub.AbstractBlockingStub {
private ChaincodeSupportBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected ChaincodeSupportBlockingStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ChaincodeSupportBlockingStub(channel, callOptions);
}
}
/**
* A stub to allow clients to do ListenableFuture-style rpc calls to service ChaincodeSupport.
*
* Interface that provides support to chaincode execution. ChaincodeContext
* provides the context necessary for the server to respond appropriately.
*
*/
public static final class ChaincodeSupportFutureStub
extends io.grpc.stub.AbstractFutureStub {
private ChaincodeSupportFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected ChaincodeSupportFutureStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ChaincodeSupportFutureStub(channel, callOptions);
}
}
private static final int METHODID_REGISTER = 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) {
default:
throw new AssertionError();
}
}
@java.lang.Override
@java.lang.SuppressWarnings("unchecked")
public io.grpc.stub.StreamObserver invoke(
io.grpc.stub.StreamObserver responseObserver) {
switch (methodId) {
case METHODID_REGISTER:
return (io.grpc.stub.StreamObserver) serviceImpl.register(
(io.grpc.stub.StreamObserver) responseObserver);
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.asyncBidiStreamingCall(
new MethodHandlers<
org.hyperledger.fabric.protos.peer.ChaincodeMessage,
org.hyperledger.fabric.protos.peer.ChaincodeMessage>(
service, METHODID_REGISTER)))
.build();
}
private static abstract class ChaincodeSupportBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
ChaincodeSupportBaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return org.hyperledger.fabric.protos.peer.ChaincodeShimProto.getDescriptor();
}
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("ChaincodeSupport");
}
}
private static final class ChaincodeSupportFileDescriptorSupplier
extends ChaincodeSupportBaseDescriptorSupplier {
ChaincodeSupportFileDescriptorSupplier() {}
}
private static final class ChaincodeSupportMethodDescriptorSupplier
extends ChaincodeSupportBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final java.lang.String methodName;
ChaincodeSupportMethodDescriptorSupplier(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 (ChaincodeSupportGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new ChaincodeSupportFileDescriptorSupplier())
.addMethod(getRegisterMethod())
.build();
}
}
}
return result;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy