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

org.hyperledger.protos.ECAPGrpc 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;

/**
 * 
 * Enrollment Certificate Authority (ECA).
 * 
*/ @javax.annotation.Generated( value = "by gRPC proto compiler (version 0.15.0)", comments = "Source: ca/ca.proto") public class ECAPGrpc { private ECAPGrpc() {} public static final String SERVICE_NAME = "protos.ECAP"; // 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.ECAP", "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_CREATE_CERTIFICATE_PAIR = io.grpc.MethodDescriptor.create( io.grpc.MethodDescriptor.MethodType.UNARY, generateFullMethodName( "protos.ECAP", "CreateCertificatePair"), io.grpc.protobuf.ProtoUtils.marshaller(org.hyperledger.protos.Ca.ECertCreateReq.getDefaultInstance()), io.grpc.protobuf.ProtoUtils.marshaller(org.hyperledger.protos.Ca.ECertCreateResp.getDefaultInstance())); @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") public static final io.grpc.MethodDescriptor METHOD_READ_CERTIFICATE_PAIR = io.grpc.MethodDescriptor.create( io.grpc.MethodDescriptor.MethodType.UNARY, generateFullMethodName( "protos.ECAP", "ReadCertificatePair"), io.grpc.protobuf.ProtoUtils.marshaller(org.hyperledger.protos.Ca.ECertReadReq.getDefaultInstance()), io.grpc.protobuf.ProtoUtils.marshaller(org.hyperledger.protos.Ca.CertPair.getDefaultInstance())); @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") public static final io.grpc.MethodDescriptor METHOD_READ_CERTIFICATE_BY_HASH = io.grpc.MethodDescriptor.create( io.grpc.MethodDescriptor.MethodType.UNARY, generateFullMethodName( "protos.ECAP", "ReadCertificateByHash"), io.grpc.protobuf.ProtoUtils.marshaller(org.hyperledger.protos.Ca.Hash.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_REVOKE_CERTIFICATE_PAIR = io.grpc.MethodDescriptor.create( io.grpc.MethodDescriptor.MethodType.UNARY, generateFullMethodName( "protos.ECAP", "RevokeCertificatePair"), io.grpc.protobuf.ProtoUtils.marshaller(org.hyperledger.protos.Ca.ECertRevokeReq.getDefaultInstance()), io.grpc.protobuf.ProtoUtils.marshaller(org.hyperledger.protos.Ca.CAStatus.getDefaultInstance())); /** * Creates a new async stub that supports all call types for the service */ public static ECAPStub newStub(io.grpc.Channel channel) { return new ECAPStub(channel); } /** * Creates a new blocking-style stub that supports unary and streaming output calls on the service */ public static ECAPBlockingStub newBlockingStub( io.grpc.Channel channel) { return new ECAPBlockingStub(channel); } /** * Creates a new ListenableFuture-style stub that supports unary and streaming output calls on the service */ public static ECAPFutureStub newFutureStub( io.grpc.Channel channel) { return new ECAPFutureStub(channel); } /** *
   * Enrollment Certificate Authority (ECA).
   * 
*/ @java.lang.Deprecated public static interface ECAP { /** */ public void readCACertificate(org.hyperledger.protos.Ca.Empty request, io.grpc.stub.StreamObserver responseObserver); /** */ public void createCertificatePair(org.hyperledger.protos.Ca.ECertCreateReq request, io.grpc.stub.StreamObserver responseObserver); /** */ public void readCertificatePair(org.hyperledger.protos.Ca.ECertReadReq request, io.grpc.stub.StreamObserver responseObserver); /** */ public void readCertificateByHash(org.hyperledger.protos.Ca.Hash request, io.grpc.stub.StreamObserver responseObserver); /** *
     * a user can revoke only his/her own cert
     * 
*/ public void revokeCertificatePair(org.hyperledger.protos.Ca.ECertRevokeReq request, io.grpc.stub.StreamObserver responseObserver); } @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1469") public static abstract class ECAPImplBase implements ECAP, 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 createCertificatePair(org.hyperledger.protos.Ca.ECertCreateReq request, io.grpc.stub.StreamObserver responseObserver) { asyncUnimplementedUnaryCall(METHOD_CREATE_CERTIFICATE_PAIR, responseObserver); } @java.lang.Override public void readCertificatePair(org.hyperledger.protos.Ca.ECertReadReq request, io.grpc.stub.StreamObserver responseObserver) { asyncUnimplementedUnaryCall(METHOD_READ_CERTIFICATE_PAIR, responseObserver); } @java.lang.Override public void readCertificateByHash(org.hyperledger.protos.Ca.Hash request, io.grpc.stub.StreamObserver responseObserver) { asyncUnimplementedUnaryCall(METHOD_READ_CERTIFICATE_BY_HASH, responseObserver); } @java.lang.Override public void revokeCertificatePair(org.hyperledger.protos.Ca.ECertRevokeReq request, io.grpc.stub.StreamObserver responseObserver) { asyncUnimplementedUnaryCall(METHOD_REVOKE_CERTIFICATE_PAIR, responseObserver); } @java.lang.Override public io.grpc.ServerServiceDefinition bindService() { return ECAPGrpc.bindService(this); } } /** *
   * Enrollment Certificate Authority (ECA).
   * 
*/ @java.lang.Deprecated public static interface ECAPBlockingClient { /** */ public org.hyperledger.protos.Ca.Cert readCACertificate(org.hyperledger.protos.Ca.Empty request); /** */ public org.hyperledger.protos.Ca.ECertCreateResp createCertificatePair(org.hyperledger.protos.Ca.ECertCreateReq request); /** */ public org.hyperledger.protos.Ca.CertPair readCertificatePair(org.hyperledger.protos.Ca.ECertReadReq request); /** */ public org.hyperledger.protos.Ca.Cert readCertificateByHash(org.hyperledger.protos.Ca.Hash request); /** *
     * a user can revoke only his/her own cert
     * 
*/ public org.hyperledger.protos.Ca.CAStatus revokeCertificatePair(org.hyperledger.protos.Ca.ECertRevokeReq request); } /** *
   * Enrollment Certificate Authority (ECA).
   * 
*/ @java.lang.Deprecated public static interface ECAPFutureClient { /** */ public com.google.common.util.concurrent.ListenableFuture readCACertificate( org.hyperledger.protos.Ca.Empty request); /** */ public com.google.common.util.concurrent.ListenableFuture createCertificatePair( org.hyperledger.protos.Ca.ECertCreateReq request); /** */ public com.google.common.util.concurrent.ListenableFuture readCertificatePair( org.hyperledger.protos.Ca.ECertReadReq request); /** */ public com.google.common.util.concurrent.ListenableFuture readCertificateByHash( org.hyperledger.protos.Ca.Hash request); /** *
     * a user can revoke only his/her own cert
     * 
*/ public com.google.common.util.concurrent.ListenableFuture revokeCertificatePair( org.hyperledger.protos.Ca.ECertRevokeReq request); } public static class ECAPStub extends io.grpc.stub.AbstractStub implements ECAP { private ECAPStub(io.grpc.Channel channel) { super(channel); } private ECAPStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected ECAPStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new ECAPStub(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 createCertificatePair(org.hyperledger.protos.Ca.ECertCreateReq request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( getChannel().newCall(METHOD_CREATE_CERTIFICATE_PAIR, getCallOptions()), request, responseObserver); } @java.lang.Override public void readCertificatePair(org.hyperledger.protos.Ca.ECertReadReq request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( getChannel().newCall(METHOD_READ_CERTIFICATE_PAIR, getCallOptions()), request, responseObserver); } @java.lang.Override public void readCertificateByHash(org.hyperledger.protos.Ca.Hash request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( getChannel().newCall(METHOD_READ_CERTIFICATE_BY_HASH, getCallOptions()), request, responseObserver); } @java.lang.Override public void revokeCertificatePair(org.hyperledger.protos.Ca.ECertRevokeReq request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( getChannel().newCall(METHOD_REVOKE_CERTIFICATE_PAIR, getCallOptions()), request, responseObserver); } } public static class ECAPBlockingStub extends io.grpc.stub.AbstractStub implements ECAPBlockingClient { private ECAPBlockingStub(io.grpc.Channel channel) { super(channel); } private ECAPBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected ECAPBlockingStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new ECAPBlockingStub(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.ECertCreateResp createCertificatePair(org.hyperledger.protos.Ca.ECertCreateReq request) { return blockingUnaryCall( getChannel(), METHOD_CREATE_CERTIFICATE_PAIR, getCallOptions(), request); } @java.lang.Override public org.hyperledger.protos.Ca.CertPair readCertificatePair(org.hyperledger.protos.Ca.ECertReadReq request) { return blockingUnaryCall( getChannel(), METHOD_READ_CERTIFICATE_PAIR, getCallOptions(), request); } @java.lang.Override public org.hyperledger.protos.Ca.Cert readCertificateByHash(org.hyperledger.protos.Ca.Hash request) { return blockingUnaryCall( getChannel(), METHOD_READ_CERTIFICATE_BY_HASH, getCallOptions(), request); } @java.lang.Override public org.hyperledger.protos.Ca.CAStatus revokeCertificatePair(org.hyperledger.protos.Ca.ECertRevokeReq request) { return blockingUnaryCall( getChannel(), METHOD_REVOKE_CERTIFICATE_PAIR, getCallOptions(), request); } } public static class ECAPFutureStub extends io.grpc.stub.AbstractStub implements ECAPFutureClient { private ECAPFutureStub(io.grpc.Channel channel) { super(channel); } private ECAPFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected ECAPFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new ECAPFutureStub(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 createCertificatePair( org.hyperledger.protos.Ca.ECertCreateReq request) { return futureUnaryCall( getChannel().newCall(METHOD_CREATE_CERTIFICATE_PAIR, getCallOptions()), request); } @java.lang.Override public com.google.common.util.concurrent.ListenableFuture readCertificatePair( org.hyperledger.protos.Ca.ECertReadReq request) { return futureUnaryCall( getChannel().newCall(METHOD_READ_CERTIFICATE_PAIR, getCallOptions()), request); } @java.lang.Override public com.google.common.util.concurrent.ListenableFuture readCertificateByHash( org.hyperledger.protos.Ca.Hash request) { return futureUnaryCall( getChannel().newCall(METHOD_READ_CERTIFICATE_BY_HASH, getCallOptions()), request); } @java.lang.Override public com.google.common.util.concurrent.ListenableFuture revokeCertificatePair( org.hyperledger.protos.Ca.ECertRevokeReq request) { return futureUnaryCall( getChannel().newCall(METHOD_REVOKE_CERTIFICATE_PAIR, getCallOptions()), request); } } @java.lang.Deprecated public static abstract class AbstractECAP extends ECAPImplBase {} private static final int METHODID_READ_CACERTIFICATE = 0; private static final int METHODID_CREATE_CERTIFICATE_PAIR = 1; private static final int METHODID_READ_CERTIFICATE_PAIR = 2; private static final int METHODID_READ_CERTIFICATE_BY_HASH = 3; private static final int METHODID_REVOKE_CERTIFICATE_PAIR = 4; 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 ECAP serviceImpl; private final int methodId; public MethodHandlers(ECAP 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_CREATE_CERTIFICATE_PAIR: serviceImpl.createCertificatePair((org.hyperledger.protos.Ca.ECertCreateReq) request, (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_READ_CERTIFICATE_PAIR: serviceImpl.readCertificatePair((org.hyperledger.protos.Ca.ECertReadReq) request, (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_READ_CERTIFICATE_BY_HASH: serviceImpl.readCertificateByHash((org.hyperledger.protos.Ca.Hash) request, (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_REVOKE_CERTIFICATE_PAIR: serviceImpl.revokeCertificatePair((org.hyperledger.protos.Ca.ECertRevokeReq) 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_CREATE_CERTIFICATE_PAIR, METHOD_READ_CERTIFICATE_PAIR, METHOD_READ_CERTIFICATE_BY_HASH, METHOD_REVOKE_CERTIFICATE_PAIR); } @java.lang.Deprecated public static io.grpc.ServerServiceDefinition bindService( final ECAP 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_CREATE_CERTIFICATE_PAIR, asyncUnaryCall( new MethodHandlers< org.hyperledger.protos.Ca.ECertCreateReq, org.hyperledger.protos.Ca.ECertCreateResp>( serviceImpl, METHODID_CREATE_CERTIFICATE_PAIR))) .addMethod( METHOD_READ_CERTIFICATE_PAIR, asyncUnaryCall( new MethodHandlers< org.hyperledger.protos.Ca.ECertReadReq, org.hyperledger.protos.Ca.CertPair>( serviceImpl, METHODID_READ_CERTIFICATE_PAIR))) .addMethod( METHOD_READ_CERTIFICATE_BY_HASH, asyncUnaryCall( new MethodHandlers< org.hyperledger.protos.Ca.Hash, org.hyperledger.protos.Ca.Cert>( serviceImpl, METHODID_READ_CERTIFICATE_BY_HASH))) .addMethod( METHOD_REVOKE_CERTIFICATE_PAIR, asyncUnaryCall( new MethodHandlers< org.hyperledger.protos.Ca.ECertRevokeReq, org.hyperledger.protos.Ca.CAStatus>( serviceImpl, METHODID_REVOKE_CERTIFICATE_PAIR))) .build(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy