org.hyperledger.protos.ECAAGrpc 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;
/**
*
* admin service
*
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 0.15.0)",
comments = "Source: ca/ca.proto")
public class ECAAGrpc {
private ECAAGrpc() {}
public static final String SERVICE_NAME = "protos.ECAA";
// 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_REGISTER_USER =
io.grpc.MethodDescriptor.create(
io.grpc.MethodDescriptor.MethodType.UNARY,
generateFullMethodName(
"protos.ECAA", "RegisterUser"),
io.grpc.protobuf.ProtoUtils.marshaller(org.hyperledger.protos.Ca.RegisterUserReq.getDefaultInstance()),
io.grpc.protobuf.ProtoUtils.marshaller(org.hyperledger.protos.Ca.Token.getDefaultInstance()));
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static final io.grpc.MethodDescriptor METHOD_READ_USER_SET =
io.grpc.MethodDescriptor.create(
io.grpc.MethodDescriptor.MethodType.UNARY,
generateFullMethodName(
"protos.ECAA", "ReadUserSet"),
io.grpc.protobuf.ProtoUtils.marshaller(org.hyperledger.protos.Ca.ReadUserSetReq.getDefaultInstance()),
io.grpc.protobuf.ProtoUtils.marshaller(org.hyperledger.protos.Ca.UserSet.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.ECAA", "RevokeCertificate"),
io.grpc.protobuf.ProtoUtils.marshaller(org.hyperledger.protos.Ca.ECertRevokeReq.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_PUBLISH_CRL =
io.grpc.MethodDescriptor.create(
io.grpc.MethodDescriptor.MethodType.UNARY,
generateFullMethodName(
"protos.ECAA", "PublishCRL"),
io.grpc.protobuf.ProtoUtils.marshaller(org.hyperledger.protos.Ca.ECertCRLReq.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 ECAAStub newStub(io.grpc.Channel channel) {
return new ECAAStub(channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static ECAABlockingStub newBlockingStub(
io.grpc.Channel channel) {
return new ECAABlockingStub(channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary and streaming output calls on the service
*/
public static ECAAFutureStub newFutureStub(
io.grpc.Channel channel) {
return new ECAAFutureStub(channel);
}
/**
*
* admin service
*
*/
@java.lang.Deprecated public static interface ECAA {
/**
*/
public void registerUser(org.hyperledger.protos.Ca.RegisterUserReq request,
io.grpc.stub.StreamObserver responseObserver);
/**
*/
public void readUserSet(org.hyperledger.protos.Ca.ReadUserSetReq request,
io.grpc.stub.StreamObserver responseObserver);
/**
*
* an admin can revoke any cert
*
*/
public void revokeCertificate(org.hyperledger.protos.Ca.ECertRevokeReq request,
io.grpc.stub.StreamObserver responseObserver);
/**
*
* publishes CRL in the blockchain
*
*/
public void publishCRL(org.hyperledger.protos.Ca.ECertCRLReq request,
io.grpc.stub.StreamObserver responseObserver);
}
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1469")
public static abstract class ECAAImplBase implements ECAA, io.grpc.BindableService {
@java.lang.Override
public void registerUser(org.hyperledger.protos.Ca.RegisterUserReq request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(METHOD_REGISTER_USER, responseObserver);
}
@java.lang.Override
public void readUserSet(org.hyperledger.protos.Ca.ReadUserSetReq request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(METHOD_READ_USER_SET, responseObserver);
}
@java.lang.Override
public void revokeCertificate(org.hyperledger.protos.Ca.ECertRevokeReq request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(METHOD_REVOKE_CERTIFICATE, responseObserver);
}
@java.lang.Override
public void publishCRL(org.hyperledger.protos.Ca.ECertCRLReq request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(METHOD_PUBLISH_CRL, responseObserver);
}
@java.lang.Override public io.grpc.ServerServiceDefinition bindService() {
return ECAAGrpc.bindService(this);
}
}
/**
*
* admin service
*
*/
@java.lang.Deprecated public static interface ECAABlockingClient {
/**
*/
public org.hyperledger.protos.Ca.Token registerUser(org.hyperledger.protos.Ca.RegisterUserReq request);
/**
*/
public org.hyperledger.protos.Ca.UserSet readUserSet(org.hyperledger.protos.Ca.ReadUserSetReq request);
/**
*
* an admin can revoke any cert
*
*/
public org.hyperledger.protos.Ca.CAStatus revokeCertificate(org.hyperledger.protos.Ca.ECertRevokeReq request);
/**
*
* publishes CRL in the blockchain
*
*/
public org.hyperledger.protos.Ca.CAStatus publishCRL(org.hyperledger.protos.Ca.ECertCRLReq request);
}
/**
*
* admin service
*
*/
@java.lang.Deprecated public static interface ECAAFutureClient {
/**
*/
public com.google.common.util.concurrent.ListenableFuture registerUser(
org.hyperledger.protos.Ca.RegisterUserReq request);
/**
*/
public com.google.common.util.concurrent.ListenableFuture readUserSet(
org.hyperledger.protos.Ca.ReadUserSetReq request);
/**
*
* an admin can revoke any cert
*
*/
public com.google.common.util.concurrent.ListenableFuture revokeCertificate(
org.hyperledger.protos.Ca.ECertRevokeReq request);
/**
*
* publishes CRL in the blockchain
*
*/
public com.google.common.util.concurrent.ListenableFuture publishCRL(
org.hyperledger.protos.Ca.ECertCRLReq request);
}
public static class ECAAStub extends io.grpc.stub.AbstractStub
implements ECAA {
private ECAAStub(io.grpc.Channel channel) {
super(channel);
}
private ECAAStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected ECAAStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new ECAAStub(channel, callOptions);
}
@java.lang.Override
public void registerUser(org.hyperledger.protos.Ca.RegisterUserReq request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(METHOD_REGISTER_USER, getCallOptions()), request, responseObserver);
}
@java.lang.Override
public void readUserSet(org.hyperledger.protos.Ca.ReadUserSetReq request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(METHOD_READ_USER_SET, getCallOptions()), request, responseObserver);
}
@java.lang.Override
public void revokeCertificate(org.hyperledger.protos.Ca.ECertRevokeReq request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(METHOD_REVOKE_CERTIFICATE, getCallOptions()), request, responseObserver);
}
@java.lang.Override
public void publishCRL(org.hyperledger.protos.Ca.ECertCRLReq request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(METHOD_PUBLISH_CRL, getCallOptions()), request, responseObserver);
}
}
public static class ECAABlockingStub extends io.grpc.stub.AbstractStub
implements ECAABlockingClient {
private ECAABlockingStub(io.grpc.Channel channel) {
super(channel);
}
private ECAABlockingStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected ECAABlockingStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new ECAABlockingStub(channel, callOptions);
}
@java.lang.Override
public org.hyperledger.protos.Ca.Token registerUser(org.hyperledger.protos.Ca.RegisterUserReq request) {
return blockingUnaryCall(
getChannel(), METHOD_REGISTER_USER, getCallOptions(), request);
}
@java.lang.Override
public org.hyperledger.protos.Ca.UserSet readUserSet(org.hyperledger.protos.Ca.ReadUserSetReq request) {
return blockingUnaryCall(
getChannel(), METHOD_READ_USER_SET, getCallOptions(), request);
}
@java.lang.Override
public org.hyperledger.protos.Ca.CAStatus revokeCertificate(org.hyperledger.protos.Ca.ECertRevokeReq request) {
return blockingUnaryCall(
getChannel(), METHOD_REVOKE_CERTIFICATE, getCallOptions(), request);
}
@java.lang.Override
public org.hyperledger.protos.Ca.CAStatus publishCRL(org.hyperledger.protos.Ca.ECertCRLReq request) {
return blockingUnaryCall(
getChannel(), METHOD_PUBLISH_CRL, getCallOptions(), request);
}
}
public static class ECAAFutureStub extends io.grpc.stub.AbstractStub
implements ECAAFutureClient {
private ECAAFutureStub(io.grpc.Channel channel) {
super(channel);
}
private ECAAFutureStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected ECAAFutureStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new ECAAFutureStub(channel, callOptions);
}
@java.lang.Override
public com.google.common.util.concurrent.ListenableFuture registerUser(
org.hyperledger.protos.Ca.RegisterUserReq request) {
return futureUnaryCall(
getChannel().newCall(METHOD_REGISTER_USER, getCallOptions()), request);
}
@java.lang.Override
public com.google.common.util.concurrent.ListenableFuture readUserSet(
org.hyperledger.protos.Ca.ReadUserSetReq request) {
return futureUnaryCall(
getChannel().newCall(METHOD_READ_USER_SET, getCallOptions()), request);
}
@java.lang.Override
public com.google.common.util.concurrent.ListenableFuture revokeCertificate(
org.hyperledger.protos.Ca.ECertRevokeReq request) {
return futureUnaryCall(
getChannel().newCall(METHOD_REVOKE_CERTIFICATE, getCallOptions()), request);
}
@java.lang.Override
public com.google.common.util.concurrent.ListenableFuture publishCRL(
org.hyperledger.protos.Ca.ECertCRLReq request) {
return futureUnaryCall(
getChannel().newCall(METHOD_PUBLISH_CRL, getCallOptions()), request);
}
}
@java.lang.Deprecated public static abstract class AbstractECAA extends ECAAImplBase {}
private static final int METHODID_REGISTER_USER = 0;
private static final int METHODID_READ_USER_SET = 1;
private static final int METHODID_REVOKE_CERTIFICATE = 2;
private static final int METHODID_PUBLISH_CRL = 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 ECAA serviceImpl;
private final int methodId;
public MethodHandlers(ECAA 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_REGISTER_USER:
serviceImpl.registerUser((org.hyperledger.protos.Ca.RegisterUserReq) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_READ_USER_SET:
serviceImpl.readUserSet((org.hyperledger.protos.Ca.ReadUserSetReq) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_REVOKE_CERTIFICATE:
serviceImpl.revokeCertificate((org.hyperledger.protos.Ca.ECertRevokeReq) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_PUBLISH_CRL:
serviceImpl.publishCRL((org.hyperledger.protos.Ca.ECertCRLReq) 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_REGISTER_USER,
METHOD_READ_USER_SET,
METHOD_REVOKE_CERTIFICATE,
METHOD_PUBLISH_CRL);
}
@java.lang.Deprecated public static io.grpc.ServerServiceDefinition bindService(
final ECAA serviceImpl) {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
METHOD_REGISTER_USER,
asyncUnaryCall(
new MethodHandlers<
org.hyperledger.protos.Ca.RegisterUserReq,
org.hyperledger.protos.Ca.Token>(
serviceImpl, METHODID_REGISTER_USER)))
.addMethod(
METHOD_READ_USER_SET,
asyncUnaryCall(
new MethodHandlers<
org.hyperledger.protos.Ca.ReadUserSetReq,
org.hyperledger.protos.Ca.UserSet>(
serviceImpl, METHODID_READ_USER_SET)))
.addMethod(
METHOD_REVOKE_CERTIFICATE,
asyncUnaryCall(
new MethodHandlers<
org.hyperledger.protos.Ca.ECertRevokeReq,
org.hyperledger.protos.Ca.CAStatus>(
serviceImpl, METHODID_REVOKE_CERTIFICATE)))
.addMethod(
METHOD_PUBLISH_CRL,
asyncUnaryCall(
new MethodHandlers<
org.hyperledger.protos.Ca.ECertCRLReq,
org.hyperledger.protos.Ca.CAStatus>(
serviceImpl, METHODID_PUBLISH_CRL)))
.build();
}
}