All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.hyperledger.fabric.protos.peer.ChaincodeSupportGrpc Maven / Gradle / Ivy

Go to download

Java SDK for Hyperledger Fabric. Deprecated as of Fabric v2.5, replaced by org.hyperledger.fabric:fabric-gateway.

There is a newer version: 2.2.26
Show newest version
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.53.0)", comments = "Source: peer/chaincode_shim.proto") @io.grpc.stub.annotations.GrpcGenerated public final class ChaincodeSupportGrpc { private ChaincodeSupportGrpc() {} public static final 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.ChaincodeShim.ChaincodeMessage.class, responseType = org.hyperledger.fabric.protos.peer.ChaincodeShim.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.ChaincodeShim.ChaincodeMessage.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( org.hyperledger.fabric.protos.peer.ChaincodeShim.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 static abstract class ChaincodeSupportImplBase implements io.grpc.BindableService { /** */ public io.grpc.stub.StreamObserver register( io.grpc.stub.StreamObserver responseObserver) { return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall(getRegisterMethod(), responseObserver); } @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( getRegisterMethod(), io.grpc.stub.ServerCalls.asyncBidiStreamingCall( new MethodHandlers< org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage, org.hyperledger.fabric.protos.peer.ChaincodeShim.ChaincodeMessage>( this, METHODID_REGISTER))) .build(); } } /** *
   * 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); } } /** *
   * 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); } } /** *
   * 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 ChaincodeSupportImplBase serviceImpl; private final int methodId; MethodHandlers(ChaincodeSupportImplBase 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(); } } } 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.ChaincodeShim.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 String methodName; ChaincodeSupportMethodDescriptorSupplier(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