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

org.hyperledger.protos.ACAPGrpc Maven / Gradle / Ivy

There is a newer version: 1.1
Show newest version
package org.hyperledger.protos;

import static io.grpc.stub.ClientCalls.asyncUnaryCall;
import static io.grpc.stub.ClientCalls.asyncServerStreamingCall;
import static io.grpc.stub.ClientCalls.asyncClientStreamingCall;
import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall;
import static io.grpc.stub.ClientCalls.blockingUnaryCall;
import static io.grpc.stub.ClientCalls.blockingServerStreamingCall;
import static io.grpc.stub.ClientCalls.futureUnaryCall;
import static io.grpc.MethodDescriptor.generateFullMethodName;
import static io.grpc.stub.ServerCalls.asyncUnaryCall;
import static io.grpc.stub.ServerCalls.asyncServerStreamingCall;
import static io.grpc.stub.ServerCalls.asyncClientStreamingCall;
import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall;
import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;
import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall;

/**
 * 
 * Attribute Certificate Authority (ACA).
 * 
*/ @javax.annotation.Generated( value = "by gRPC proto compiler (version 0.15.0)", comments = "Source: ca/ca.proto") public class ACAPGrpc { private ACAPGrpc() {} public static final String SERVICE_NAME = "protos.ACAP"; // Static method descriptors that strictly reflect the proto. @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") public static final io.grpc.MethodDescriptor METHOD_READ_CACERTIFICATE = io.grpc.MethodDescriptor.create( io.grpc.MethodDescriptor.MethodType.UNARY, generateFullMethodName( "protos.ACAP", "ReadCACertificate"), io.grpc.protobuf.ProtoUtils.marshaller(org.hyperledger.protos.Ca.Empty.getDefaultInstance()), io.grpc.protobuf.ProtoUtils.marshaller(org.hyperledger.protos.Ca.Cert.getDefaultInstance())); @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") public static final io.grpc.MethodDescriptor METHOD_REQUEST_ATTRIBUTES = io.grpc.MethodDescriptor.create( io.grpc.MethodDescriptor.MethodType.UNARY, generateFullMethodName( "protos.ACAP", "RequestAttributes"), io.grpc.protobuf.ProtoUtils.marshaller(org.hyperledger.protos.Ca.ACAAttrReq.getDefaultInstance()), io.grpc.protobuf.ProtoUtils.marshaller(org.hyperledger.protos.Ca.ACAAttrResp.getDefaultInstance())); @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") public static final io.grpc.MethodDescriptor METHOD_FETCH_ATTRIBUTES = io.grpc.MethodDescriptor.create( io.grpc.MethodDescriptor.MethodType.UNARY, generateFullMethodName( "protos.ACAP", "FetchAttributes"), io.grpc.protobuf.ProtoUtils.marshaller(org.hyperledger.protos.Ca.ACAFetchAttrReq.getDefaultInstance()), io.grpc.protobuf.ProtoUtils.marshaller(org.hyperledger.protos.Ca.ACAFetchAttrResp.getDefaultInstance())); /** * Creates a new async stub that supports all call types for the service */ public static ACAPStub newStub(io.grpc.Channel channel) { return new ACAPStub(channel); } /** * Creates a new blocking-style stub that supports unary and streaming output calls on the service */ public static ACAPBlockingStub newBlockingStub( io.grpc.Channel channel) { return new ACAPBlockingStub(channel); } /** * Creates a new ListenableFuture-style stub that supports unary and streaming output calls on the service */ public static ACAPFutureStub newFutureStub( io.grpc.Channel channel) { return new ACAPFutureStub(channel); } /** *
   * Attribute Certificate Authority (ACA).
   * 
*/ @java.lang.Deprecated public static interface ACAP { /** */ public void readCACertificate(org.hyperledger.protos.Ca.Empty request, io.grpc.stub.StreamObserver responseObserver); /** */ public void requestAttributes(org.hyperledger.protos.Ca.ACAAttrReq request, io.grpc.stub.StreamObserver responseObserver); /** */ public void fetchAttributes(org.hyperledger.protos.Ca.ACAFetchAttrReq request, io.grpc.stub.StreamObserver responseObserver); } @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1469") public static abstract class ACAPImplBase implements ACAP, io.grpc.BindableService { @java.lang.Override public void readCACertificate(org.hyperledger.protos.Ca.Empty request, io.grpc.stub.StreamObserver responseObserver) { asyncUnimplementedUnaryCall(METHOD_READ_CACERTIFICATE, responseObserver); } @java.lang.Override public void requestAttributes(org.hyperledger.protos.Ca.ACAAttrReq request, io.grpc.stub.StreamObserver responseObserver) { asyncUnimplementedUnaryCall(METHOD_REQUEST_ATTRIBUTES, responseObserver); } @java.lang.Override public void fetchAttributes(org.hyperledger.protos.Ca.ACAFetchAttrReq request, io.grpc.stub.StreamObserver responseObserver) { asyncUnimplementedUnaryCall(METHOD_FETCH_ATTRIBUTES, responseObserver); } @java.lang.Override public io.grpc.ServerServiceDefinition bindService() { return ACAPGrpc.bindService(this); } } /** *
   * Attribute Certificate Authority (ACA).
   * 
*/ @java.lang.Deprecated public static interface ACAPBlockingClient { /** */ public org.hyperledger.protos.Ca.Cert readCACertificate(org.hyperledger.protos.Ca.Empty request); /** */ public org.hyperledger.protos.Ca.ACAAttrResp requestAttributes(org.hyperledger.protos.Ca.ACAAttrReq request); /** */ public org.hyperledger.protos.Ca.ACAFetchAttrResp fetchAttributes(org.hyperledger.protos.Ca.ACAFetchAttrReq request); } /** *
   * Attribute Certificate Authority (ACA).
   * 
*/ @java.lang.Deprecated public static interface ACAPFutureClient { /** */ public com.google.common.util.concurrent.ListenableFuture readCACertificate( org.hyperledger.protos.Ca.Empty request); /** */ public com.google.common.util.concurrent.ListenableFuture requestAttributes( org.hyperledger.protos.Ca.ACAAttrReq request); /** */ public com.google.common.util.concurrent.ListenableFuture fetchAttributes( org.hyperledger.protos.Ca.ACAFetchAttrReq request); } public static class ACAPStub extends io.grpc.stub.AbstractStub implements ACAP { private ACAPStub(io.grpc.Channel channel) { super(channel); } private ACAPStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected ACAPStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new ACAPStub(channel, callOptions); } @java.lang.Override public void readCACertificate(org.hyperledger.protos.Ca.Empty request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( getChannel().newCall(METHOD_READ_CACERTIFICATE, getCallOptions()), request, responseObserver); } @java.lang.Override public void requestAttributes(org.hyperledger.protos.Ca.ACAAttrReq request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( getChannel().newCall(METHOD_REQUEST_ATTRIBUTES, getCallOptions()), request, responseObserver); } @java.lang.Override public void fetchAttributes(org.hyperledger.protos.Ca.ACAFetchAttrReq request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( getChannel().newCall(METHOD_FETCH_ATTRIBUTES, getCallOptions()), request, responseObserver); } } public static class ACAPBlockingStub extends io.grpc.stub.AbstractStub implements ACAPBlockingClient { private ACAPBlockingStub(io.grpc.Channel channel) { super(channel); } private ACAPBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected ACAPBlockingStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new ACAPBlockingStub(channel, callOptions); } @java.lang.Override public org.hyperledger.protos.Ca.Cert readCACertificate(org.hyperledger.protos.Ca.Empty request) { return blockingUnaryCall( getChannel(), METHOD_READ_CACERTIFICATE, getCallOptions(), request); } @java.lang.Override public org.hyperledger.protos.Ca.ACAAttrResp requestAttributes(org.hyperledger.protos.Ca.ACAAttrReq request) { return blockingUnaryCall( getChannel(), METHOD_REQUEST_ATTRIBUTES, getCallOptions(), request); } @java.lang.Override public org.hyperledger.protos.Ca.ACAFetchAttrResp fetchAttributes(org.hyperledger.protos.Ca.ACAFetchAttrReq request) { return blockingUnaryCall( getChannel(), METHOD_FETCH_ATTRIBUTES, getCallOptions(), request); } } public static class ACAPFutureStub extends io.grpc.stub.AbstractStub implements ACAPFutureClient { private ACAPFutureStub(io.grpc.Channel channel) { super(channel); } private ACAPFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected ACAPFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new ACAPFutureStub(channel, callOptions); } @java.lang.Override public com.google.common.util.concurrent.ListenableFuture readCACertificate( org.hyperledger.protos.Ca.Empty request) { return futureUnaryCall( getChannel().newCall(METHOD_READ_CACERTIFICATE, getCallOptions()), request); } @java.lang.Override public com.google.common.util.concurrent.ListenableFuture requestAttributes( org.hyperledger.protos.Ca.ACAAttrReq request) { return futureUnaryCall( getChannel().newCall(METHOD_REQUEST_ATTRIBUTES, getCallOptions()), request); } @java.lang.Override public com.google.common.util.concurrent.ListenableFuture fetchAttributes( org.hyperledger.protos.Ca.ACAFetchAttrReq request) { return futureUnaryCall( getChannel().newCall(METHOD_FETCH_ATTRIBUTES, getCallOptions()), request); } } @java.lang.Deprecated public static abstract class AbstractACAP extends ACAPImplBase {} private static final int METHODID_READ_CACERTIFICATE = 0; private static final int METHODID_REQUEST_ATTRIBUTES = 1; private static final int METHODID_FETCH_ATTRIBUTES = 2; private static 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 ACAP serviceImpl; private final int methodId; public MethodHandlers(ACAP 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_READ_CACERTIFICATE: serviceImpl.readCACertificate((org.hyperledger.protos.Ca.Empty) request, (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_REQUEST_ATTRIBUTES: serviceImpl.requestAttributes((org.hyperledger.protos.Ca.ACAAttrReq) request, (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_FETCH_ATTRIBUTES: serviceImpl.fetchAttributes((org.hyperledger.protos.Ca.ACAFetchAttrReq) 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 io.grpc.ServiceDescriptor getServiceDescriptor() { return new io.grpc.ServiceDescriptor(SERVICE_NAME, METHOD_READ_CACERTIFICATE, METHOD_REQUEST_ATTRIBUTES, METHOD_FETCH_ATTRIBUTES); } @java.lang.Deprecated public static io.grpc.ServerServiceDefinition bindService( final ACAP serviceImpl) { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( METHOD_READ_CACERTIFICATE, asyncUnaryCall( new MethodHandlers< org.hyperledger.protos.Ca.Empty, org.hyperledger.protos.Ca.Cert>( serviceImpl, METHODID_READ_CACERTIFICATE))) .addMethod( METHOD_REQUEST_ATTRIBUTES, asyncUnaryCall( new MethodHandlers< org.hyperledger.protos.Ca.ACAAttrReq, org.hyperledger.protos.Ca.ACAAttrResp>( serviceImpl, METHODID_REQUEST_ATTRIBUTES))) .addMethod( METHOD_FETCH_ATTRIBUTES, asyncUnaryCall( new MethodHandlers< org.hyperledger.protos.Ca.ACAFetchAttrReq, org.hyperledger.protos.Ca.ACAFetchAttrResp>( serviceImpl, METHODID_FETCH_ATTRIBUTES))) .build(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy