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

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

/**
 * 
 * Transaction Certificate Authority (TCA).
 * 
*/ @javax.annotation.Generated( value = "by gRPC proto compiler (version 0.15.0)", comments = "Source: ca/ca.proto") public class TCAPGrpc { private TCAPGrpc() {} public static final String SERVICE_NAME = "protos.TCAP"; // 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.TCAP", "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_SET = io.grpc.MethodDescriptor.create( io.grpc.MethodDescriptor.MethodType.UNARY, generateFullMethodName( "protos.TCAP", "CreateCertificateSet"), io.grpc.protobuf.ProtoUtils.marshaller(org.hyperledger.protos.Ca.TCertCreateSetReq.getDefaultInstance()), io.grpc.protobuf.ProtoUtils.marshaller(org.hyperledger.protos.Ca.TCertCreateSetResp.getDefaultInstance())); @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") public static final io.grpc.MethodDescriptor METHOD_REVOKE_CERTIFICATE = io.grpc.MethodDescriptor.create( io.grpc.MethodDescriptor.MethodType.UNARY, generateFullMethodName( "protos.TCAP", "RevokeCertificate"), io.grpc.protobuf.ProtoUtils.marshaller(org.hyperledger.protos.Ca.TCertRevokeReq.getDefaultInstance()), io.grpc.protobuf.ProtoUtils.marshaller(org.hyperledger.protos.Ca.CAStatus.getDefaultInstance())); @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") public static final io.grpc.MethodDescriptor METHOD_REVOKE_CERTIFICATE_SET = io.grpc.MethodDescriptor.create( io.grpc.MethodDescriptor.MethodType.UNARY, generateFullMethodName( "protos.TCAP", "RevokeCertificateSet"), io.grpc.protobuf.ProtoUtils.marshaller(org.hyperledger.protos.Ca.TCertRevokeSetReq.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 TCAPStub newStub(io.grpc.Channel channel) { return new TCAPStub(channel); } /** * Creates a new blocking-style stub that supports unary and streaming output calls on the service */ public static TCAPBlockingStub newBlockingStub( io.grpc.Channel channel) { return new TCAPBlockingStub(channel); } /** * Creates a new ListenableFuture-style stub that supports unary and streaming output calls on the service */ public static TCAPFutureStub newFutureStub( io.grpc.Channel channel) { return new TCAPFutureStub(channel); } /** *
   * Transaction Certificate Authority (TCA).
   * 
*/ @java.lang.Deprecated public static interface TCAP { /** */ public void readCACertificate(org.hyperledger.protos.Ca.Empty request, io.grpc.stub.StreamObserver responseObserver); /** */ public void createCertificateSet(org.hyperledger.protos.Ca.TCertCreateSetReq request, io.grpc.stub.StreamObserver responseObserver); /** *
     * a user can revoke only his/her cert
     * 
*/ public void revokeCertificate(org.hyperledger.protos.Ca.TCertRevokeReq request, io.grpc.stub.StreamObserver responseObserver); /** *
     * a user can revoke only his/her certs
     * 
*/ public void revokeCertificateSet(org.hyperledger.protos.Ca.TCertRevokeSetReq request, io.grpc.stub.StreamObserver responseObserver); } @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1469") public static abstract class TCAPImplBase implements TCAP, 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 createCertificateSet(org.hyperledger.protos.Ca.TCertCreateSetReq request, io.grpc.stub.StreamObserver responseObserver) { asyncUnimplementedUnaryCall(METHOD_CREATE_CERTIFICATE_SET, responseObserver); } @java.lang.Override public void revokeCertificate(org.hyperledger.protos.Ca.TCertRevokeReq request, io.grpc.stub.StreamObserver responseObserver) { asyncUnimplementedUnaryCall(METHOD_REVOKE_CERTIFICATE, responseObserver); } @java.lang.Override public void revokeCertificateSet(org.hyperledger.protos.Ca.TCertRevokeSetReq request, io.grpc.stub.StreamObserver responseObserver) { asyncUnimplementedUnaryCall(METHOD_REVOKE_CERTIFICATE_SET, responseObserver); } @java.lang.Override public io.grpc.ServerServiceDefinition bindService() { return TCAPGrpc.bindService(this); } } /** *
   * Transaction Certificate Authority (TCA).
   * 
*/ @java.lang.Deprecated public static interface TCAPBlockingClient { /** */ public org.hyperledger.protos.Ca.Cert readCACertificate(org.hyperledger.protos.Ca.Empty request); /** */ public org.hyperledger.protos.Ca.TCertCreateSetResp createCertificateSet(org.hyperledger.protos.Ca.TCertCreateSetReq request); /** *
     * a user can revoke only his/her cert
     * 
*/ public org.hyperledger.protos.Ca.CAStatus revokeCertificate(org.hyperledger.protos.Ca.TCertRevokeReq request); /** *
     * a user can revoke only his/her certs
     * 
*/ public org.hyperledger.protos.Ca.CAStatus revokeCertificateSet(org.hyperledger.protos.Ca.TCertRevokeSetReq request); } /** *
   * Transaction Certificate Authority (TCA).
   * 
*/ @java.lang.Deprecated public static interface TCAPFutureClient { /** */ public com.google.common.util.concurrent.ListenableFuture readCACertificate( org.hyperledger.protos.Ca.Empty request); /** */ public com.google.common.util.concurrent.ListenableFuture createCertificateSet( org.hyperledger.protos.Ca.TCertCreateSetReq request); /** *
     * a user can revoke only his/her cert
     * 
*/ public com.google.common.util.concurrent.ListenableFuture revokeCertificate( org.hyperledger.protos.Ca.TCertRevokeReq request); /** *
     * a user can revoke only his/her certs
     * 
*/ public com.google.common.util.concurrent.ListenableFuture revokeCertificateSet( org.hyperledger.protos.Ca.TCertRevokeSetReq request); } public static class TCAPStub extends io.grpc.stub.AbstractStub implements TCAP { private TCAPStub(io.grpc.Channel channel) { super(channel); } private TCAPStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected TCAPStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new TCAPStub(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 createCertificateSet(org.hyperledger.protos.Ca.TCertCreateSetReq request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( getChannel().newCall(METHOD_CREATE_CERTIFICATE_SET, getCallOptions()), request, responseObserver); } @java.lang.Override public void revokeCertificate(org.hyperledger.protos.Ca.TCertRevokeReq request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( getChannel().newCall(METHOD_REVOKE_CERTIFICATE, getCallOptions()), request, responseObserver); } @java.lang.Override public void revokeCertificateSet(org.hyperledger.protos.Ca.TCertRevokeSetReq request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( getChannel().newCall(METHOD_REVOKE_CERTIFICATE_SET, getCallOptions()), request, responseObserver); } } public static class TCAPBlockingStub extends io.grpc.stub.AbstractStub implements TCAPBlockingClient { private TCAPBlockingStub(io.grpc.Channel channel) { super(channel); } private TCAPBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected TCAPBlockingStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new TCAPBlockingStub(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.TCertCreateSetResp createCertificateSet(org.hyperledger.protos.Ca.TCertCreateSetReq request) { return blockingUnaryCall( getChannel(), METHOD_CREATE_CERTIFICATE_SET, getCallOptions(), request); } @java.lang.Override public org.hyperledger.protos.Ca.CAStatus revokeCertificate(org.hyperledger.protos.Ca.TCertRevokeReq request) { return blockingUnaryCall( getChannel(), METHOD_REVOKE_CERTIFICATE, getCallOptions(), request); } @java.lang.Override public org.hyperledger.protos.Ca.CAStatus revokeCertificateSet(org.hyperledger.protos.Ca.TCertRevokeSetReq request) { return blockingUnaryCall( getChannel(), METHOD_REVOKE_CERTIFICATE_SET, getCallOptions(), request); } } public static class TCAPFutureStub extends io.grpc.stub.AbstractStub implements TCAPFutureClient { private TCAPFutureStub(io.grpc.Channel channel) { super(channel); } private TCAPFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected TCAPFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new TCAPFutureStub(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 createCertificateSet( org.hyperledger.protos.Ca.TCertCreateSetReq request) { return futureUnaryCall( getChannel().newCall(METHOD_CREATE_CERTIFICATE_SET, getCallOptions()), request); } @java.lang.Override public com.google.common.util.concurrent.ListenableFuture revokeCertificate( org.hyperledger.protos.Ca.TCertRevokeReq request) { return futureUnaryCall( getChannel().newCall(METHOD_REVOKE_CERTIFICATE, getCallOptions()), request); } @java.lang.Override public com.google.common.util.concurrent.ListenableFuture revokeCertificateSet( org.hyperledger.protos.Ca.TCertRevokeSetReq request) { return futureUnaryCall( getChannel().newCall(METHOD_REVOKE_CERTIFICATE_SET, getCallOptions()), request); } } @java.lang.Deprecated public static abstract class AbstractTCAP extends TCAPImplBase {} private static final int METHODID_READ_CACERTIFICATE = 0; private static final int METHODID_CREATE_CERTIFICATE_SET = 1; private static final int METHODID_REVOKE_CERTIFICATE = 2; private static final int METHODID_REVOKE_CERTIFICATE_SET = 3; 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 TCAP serviceImpl; private final int methodId; public MethodHandlers(TCAP 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_SET: serviceImpl.createCertificateSet((org.hyperledger.protos.Ca.TCertCreateSetReq) request, (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_REVOKE_CERTIFICATE: serviceImpl.revokeCertificate((org.hyperledger.protos.Ca.TCertRevokeReq) request, (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_REVOKE_CERTIFICATE_SET: serviceImpl.revokeCertificateSet((org.hyperledger.protos.Ca.TCertRevokeSetReq) 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_SET, METHOD_REVOKE_CERTIFICATE, METHOD_REVOKE_CERTIFICATE_SET); } @java.lang.Deprecated public static io.grpc.ServerServiceDefinition bindService( final TCAP 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_SET, asyncUnaryCall( new MethodHandlers< org.hyperledger.protos.Ca.TCertCreateSetReq, org.hyperledger.protos.Ca.TCertCreateSetResp>( serviceImpl, METHODID_CREATE_CERTIFICATE_SET))) .addMethod( METHOD_REVOKE_CERTIFICATE, asyncUnaryCall( new MethodHandlers< org.hyperledger.protos.Ca.TCertRevokeReq, org.hyperledger.protos.Ca.CAStatus>( serviceImpl, METHODID_REVOKE_CERTIFICATE))) .addMethod( METHOD_REVOKE_CERTIFICATE_SET, asyncUnaryCall( new MethodHandlers< org.hyperledger.protos.Ca.TCertRevokeSetReq, org.hyperledger.protos.Ca.CAStatus>( serviceImpl, METHODID_REVOKE_CERTIFICATE_SET))) .build(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy