org.hyperledger.protos.TLSCAPGrpc Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fabric-java-sdk Show documentation
Show all versions of fabric-java-sdk Show documentation
This is a fork of Hyperledger Fabric fabric-sdk-java
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;
/**
*
* TLS Certificate Authority (TLSCA)
*
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 0.15.0)",
comments = "Source: ca/ca.proto")
public class TLSCAPGrpc {
private TLSCAPGrpc() {}
public static final String SERVICE_NAME = "protos.TLSCAP";
// 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.TLSCAP", "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 =
io.grpc.MethodDescriptor.create(
io.grpc.MethodDescriptor.MethodType.UNARY,
generateFullMethodName(
"protos.TLSCAP", "CreateCertificate"),
io.grpc.protobuf.ProtoUtils.marshaller(org.hyperledger.protos.Ca.TLSCertCreateReq.getDefaultInstance()),
io.grpc.protobuf.ProtoUtils.marshaller(org.hyperledger.protos.Ca.TLSCertCreateResp.getDefaultInstance()));
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static final io.grpc.MethodDescriptor METHOD_READ_CERTIFICATE =
io.grpc.MethodDescriptor.create(
io.grpc.MethodDescriptor.MethodType.UNARY,
generateFullMethodName(
"protos.TLSCAP", "ReadCertificate"),
io.grpc.protobuf.ProtoUtils.marshaller(org.hyperledger.protos.Ca.TLSCertReadReq.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 =
io.grpc.MethodDescriptor.create(
io.grpc.MethodDescriptor.MethodType.UNARY,
generateFullMethodName(
"protos.TLSCAP", "RevokeCertificate"),
io.grpc.protobuf.ProtoUtils.marshaller(org.hyperledger.protos.Ca.TLSCertRevokeReq.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 TLSCAPStub newStub(io.grpc.Channel channel) {
return new TLSCAPStub(channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static TLSCAPBlockingStub newBlockingStub(
io.grpc.Channel channel) {
return new TLSCAPBlockingStub(channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary and streaming output calls on the service
*/
public static TLSCAPFutureStub newFutureStub(
io.grpc.Channel channel) {
return new TLSCAPFutureStub(channel);
}
/**
*
* TLS Certificate Authority (TLSCA)
*
*/
@java.lang.Deprecated public static interface TLSCAP {
/**
*/
public void readCACertificate(org.hyperledger.protos.Ca.Empty request,
io.grpc.stub.StreamObserver responseObserver);
/**
*/
public void createCertificate(org.hyperledger.protos.Ca.TLSCertCreateReq request,
io.grpc.stub.StreamObserver responseObserver);
/**
*/
public void readCertificate(org.hyperledger.protos.Ca.TLSCertReadReq request,
io.grpc.stub.StreamObserver responseObserver);
/**
*
* a user can revoke only his/her cert
*
*/
public void revokeCertificate(org.hyperledger.protos.Ca.TLSCertRevokeReq request,
io.grpc.stub.StreamObserver responseObserver);
}
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1469")
public static abstract class TLSCAPImplBase implements TLSCAP, 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 createCertificate(org.hyperledger.protos.Ca.TLSCertCreateReq request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(METHOD_CREATE_CERTIFICATE, responseObserver);
}
@java.lang.Override
public void readCertificate(org.hyperledger.protos.Ca.TLSCertReadReq request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(METHOD_READ_CERTIFICATE, responseObserver);
}
@java.lang.Override
public void revokeCertificate(org.hyperledger.protos.Ca.TLSCertRevokeReq request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(METHOD_REVOKE_CERTIFICATE, responseObserver);
}
@java.lang.Override public io.grpc.ServerServiceDefinition bindService() {
return TLSCAPGrpc.bindService(this);
}
}
/**
*
* TLS Certificate Authority (TLSCA)
*
*/
@java.lang.Deprecated public static interface TLSCAPBlockingClient {
/**
*/
public org.hyperledger.protos.Ca.Cert readCACertificate(org.hyperledger.protos.Ca.Empty request);
/**
*/
public org.hyperledger.protos.Ca.TLSCertCreateResp createCertificate(org.hyperledger.protos.Ca.TLSCertCreateReq request);
/**
*/
public org.hyperledger.protos.Ca.Cert readCertificate(org.hyperledger.protos.Ca.TLSCertReadReq request);
/**
*
* a user can revoke only his/her cert
*
*/
public org.hyperledger.protos.Ca.CAStatus revokeCertificate(org.hyperledger.protos.Ca.TLSCertRevokeReq request);
}
/**
*
* TLS Certificate Authority (TLSCA)
*
*/
@java.lang.Deprecated public static interface TLSCAPFutureClient {
/**
*/
public com.google.common.util.concurrent.ListenableFuture readCACertificate(
org.hyperledger.protos.Ca.Empty request);
/**
*/
public com.google.common.util.concurrent.ListenableFuture createCertificate(
org.hyperledger.protos.Ca.TLSCertCreateReq request);
/**
*/
public com.google.common.util.concurrent.ListenableFuture readCertificate(
org.hyperledger.protos.Ca.TLSCertReadReq request);
/**
*
* a user can revoke only his/her cert
*
*/
public com.google.common.util.concurrent.ListenableFuture revokeCertificate(
org.hyperledger.protos.Ca.TLSCertRevokeReq request);
}
public static class TLSCAPStub extends io.grpc.stub.AbstractStub
implements TLSCAP {
private TLSCAPStub(io.grpc.Channel channel) {
super(channel);
}
private TLSCAPStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected TLSCAPStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new TLSCAPStub(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 createCertificate(org.hyperledger.protos.Ca.TLSCertCreateReq request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(METHOD_CREATE_CERTIFICATE, getCallOptions()), request, responseObserver);
}
@java.lang.Override
public void readCertificate(org.hyperledger.protos.Ca.TLSCertReadReq request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(METHOD_READ_CERTIFICATE, getCallOptions()), request, responseObserver);
}
@java.lang.Override
public void revokeCertificate(org.hyperledger.protos.Ca.TLSCertRevokeReq request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(METHOD_REVOKE_CERTIFICATE, getCallOptions()), request, responseObserver);
}
}
public static class TLSCAPBlockingStub extends io.grpc.stub.AbstractStub
implements TLSCAPBlockingClient {
private TLSCAPBlockingStub(io.grpc.Channel channel) {
super(channel);
}
private TLSCAPBlockingStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected TLSCAPBlockingStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new TLSCAPBlockingStub(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.TLSCertCreateResp createCertificate(org.hyperledger.protos.Ca.TLSCertCreateReq request) {
return blockingUnaryCall(
getChannel(), METHOD_CREATE_CERTIFICATE, getCallOptions(), request);
}
@java.lang.Override
public org.hyperledger.protos.Ca.Cert readCertificate(org.hyperledger.protos.Ca.TLSCertReadReq request) {
return blockingUnaryCall(
getChannel(), METHOD_READ_CERTIFICATE, getCallOptions(), request);
}
@java.lang.Override
public org.hyperledger.protos.Ca.CAStatus revokeCertificate(org.hyperledger.protos.Ca.TLSCertRevokeReq request) {
return blockingUnaryCall(
getChannel(), METHOD_REVOKE_CERTIFICATE, getCallOptions(), request);
}
}
public static class TLSCAPFutureStub extends io.grpc.stub.AbstractStub
implements TLSCAPFutureClient {
private TLSCAPFutureStub(io.grpc.Channel channel) {
super(channel);
}
private TLSCAPFutureStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected TLSCAPFutureStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new TLSCAPFutureStub(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 createCertificate(
org.hyperledger.protos.Ca.TLSCertCreateReq request) {
return futureUnaryCall(
getChannel().newCall(METHOD_CREATE_CERTIFICATE, getCallOptions()), request);
}
@java.lang.Override
public com.google.common.util.concurrent.ListenableFuture readCertificate(
org.hyperledger.protos.Ca.TLSCertReadReq request) {
return futureUnaryCall(
getChannel().newCall(METHOD_READ_CERTIFICATE, getCallOptions()), request);
}
@java.lang.Override
public com.google.common.util.concurrent.ListenableFuture revokeCertificate(
org.hyperledger.protos.Ca.TLSCertRevokeReq request) {
return futureUnaryCall(
getChannel().newCall(METHOD_REVOKE_CERTIFICATE, getCallOptions()), request);
}
}
@java.lang.Deprecated public static abstract class AbstractTLSCAP extends TLSCAPImplBase {}
private static final int METHODID_READ_CACERTIFICATE = 0;
private static final int METHODID_CREATE_CERTIFICATE = 1;
private static final int METHODID_READ_CERTIFICATE = 2;
private static final int METHODID_REVOKE_CERTIFICATE = 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 TLSCAP serviceImpl;
private final int methodId;
public MethodHandlers(TLSCAP 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:
serviceImpl.createCertificate((org.hyperledger.protos.Ca.TLSCertCreateReq) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_READ_CERTIFICATE:
serviceImpl.readCertificate((org.hyperledger.protos.Ca.TLSCertReadReq) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_REVOKE_CERTIFICATE:
serviceImpl.revokeCertificate((org.hyperledger.protos.Ca.TLSCertRevokeReq) 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,
METHOD_READ_CERTIFICATE,
METHOD_REVOKE_CERTIFICATE);
}
@java.lang.Deprecated public static io.grpc.ServerServiceDefinition bindService(
final TLSCAP 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,
asyncUnaryCall(
new MethodHandlers<
org.hyperledger.protos.Ca.TLSCertCreateReq,
org.hyperledger.protos.Ca.TLSCertCreateResp>(
serviceImpl, METHODID_CREATE_CERTIFICATE)))
.addMethod(
METHOD_READ_CERTIFICATE,
asyncUnaryCall(
new MethodHandlers<
org.hyperledger.protos.Ca.TLSCertReadReq,
org.hyperledger.protos.Ca.Cert>(
serviceImpl, METHODID_READ_CERTIFICATE)))
.addMethod(
METHOD_REVOKE_CERTIFICATE,
asyncUnaryCall(
new MethodHandlers<
org.hyperledger.protos.Ca.TLSCertRevokeReq,
org.hyperledger.protos.Ca.CAStatus>(
serviceImpl, METHODID_REVOKE_CERTIFICATE)))
.build();
}
}