Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
* Service where the source is the gRPC client. The source is responsible for
* initiating connections and opening streams.
*
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.64.2)",
comments = "Source: mcp/v1alpha1/mcp.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class ResourceSinkGrpc {
private ResourceSinkGrpc() {}
public static final java.lang.String SERVICE_NAME = "istio.mcp.v1alpha1.ResourceSink";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor getEstablishResourceStreamMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "EstablishResourceStream",
requestType = istio.mcp.v1alpha1.Mcp.Resources.class,
responseType = istio.mcp.v1alpha1.Mcp.RequestResources.class,
methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
public static io.grpc.MethodDescriptor getEstablishResourceStreamMethod() {
io.grpc.MethodDescriptor getEstablishResourceStreamMethod;
if ((getEstablishResourceStreamMethod = ResourceSinkGrpc.getEstablishResourceStreamMethod) == null) {
synchronized (ResourceSinkGrpc.class) {
if ((getEstablishResourceStreamMethod = ResourceSinkGrpc.getEstablishResourceStreamMethod) == null) {
ResourceSinkGrpc.getEstablishResourceStreamMethod = getEstablishResourceStreamMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "EstablishResourceStream"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
istio.mcp.v1alpha1.Mcp.Resources.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
istio.mcp.v1alpha1.Mcp.RequestResources.getDefaultInstance()))
.setSchemaDescriptor(new ResourceSinkMethodDescriptorSupplier("EstablishResourceStream"))
.build();
}
}
}
return getEstablishResourceStreamMethod;
}
/**
* Creates a new async stub that supports all call types for the service
*/
public static ResourceSinkStub newStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public ResourceSinkStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ResourceSinkStub(channel, callOptions);
}
};
return ResourceSinkStub.newStub(factory, channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static ResourceSinkBlockingStub newBlockingStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public ResourceSinkBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ResourceSinkBlockingStub(channel, callOptions);
}
};
return ResourceSinkBlockingStub.newStub(factory, channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static ResourceSinkFutureStub newFutureStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public ResourceSinkFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ResourceSinkFutureStub(channel, callOptions);
}
};
return ResourceSinkFutureStub.newStub(factory, channel);
}
/**
*
* Service where the source is the gRPC client. The source is responsible for
* initiating connections and opening streams.
*
*/
public interface AsyncService {
/**
*
* The source, acting as gRPC client, establishes a new resource stream
* with the sink. The sink sends RequestResources message to and
* receives Resources messages from the source.
*
*/
default io.grpc.stub.StreamObserver establishResourceStream(
io.grpc.stub.StreamObserver responseObserver) {
return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall(getEstablishResourceStreamMethod(), responseObserver);
}
}
/**
* Base class for the server implementation of the service ResourceSink.
*
* Service where the source is the gRPC client. The source is responsible for
* initiating connections and opening streams.
*
*/
public static abstract class ResourceSinkImplBase
implements io.grpc.BindableService, AsyncService {
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return ResourceSinkGrpc.bindService(this);
}
}
/**
* A stub to allow clients to do asynchronous rpc calls to service ResourceSink.
*
* Service where the source is the gRPC client. The source is responsible for
* initiating connections and opening streams.
*
*/
public static final class ResourceSinkStub
extends io.grpc.stub.AbstractAsyncStub {
private ResourceSinkStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected ResourceSinkStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ResourceSinkStub(channel, callOptions);
}
/**
*
* The source, acting as gRPC client, establishes a new resource stream
* with the sink. The sink sends RequestResources message to and
* receives Resources messages from the source.
*
*/
public io.grpc.stub.StreamObserver establishResourceStream(
io.grpc.stub.StreamObserver responseObserver) {
return io.grpc.stub.ClientCalls.asyncBidiStreamingCall(
getChannel().newCall(getEstablishResourceStreamMethod(), getCallOptions()), responseObserver);
}
}
/**
* A stub to allow clients to do synchronous rpc calls to service ResourceSink.
*
* Service where the source is the gRPC client. The source is responsible for
* initiating connections and opening streams.
*
*/
public static final class ResourceSinkBlockingStub
extends io.grpc.stub.AbstractBlockingStub {
private ResourceSinkBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected ResourceSinkBlockingStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ResourceSinkBlockingStub(channel, callOptions);
}
}
/**
* A stub to allow clients to do ListenableFuture-style rpc calls to service ResourceSink.
*
* Service where the source is the gRPC client. The source is responsible for
* initiating connections and opening streams.
*
*/
public static final class ResourceSinkFutureStub
extends io.grpc.stub.AbstractFutureStub {
private ResourceSinkFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected ResourceSinkFutureStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ResourceSinkFutureStub(channel, callOptions);
}
}
private static final int METHODID_ESTABLISH_RESOURCE_STREAM = 0;
private static final 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 AsyncService serviceImpl;
private final int methodId;
MethodHandlers(AsyncService 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) {
default:
throw new AssertionError();
}
}
@java.lang.Override
@java.lang.SuppressWarnings("unchecked")
public io.grpc.stub.StreamObserver invoke(
io.grpc.stub.StreamObserver responseObserver) {
switch (methodId) {
case METHODID_ESTABLISH_RESOURCE_STREAM:
return (io.grpc.stub.StreamObserver) serviceImpl.establishResourceStream(
(io.grpc.stub.StreamObserver) responseObserver);
default:
throw new AssertionError();
}
}
}
public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
getEstablishResourceStreamMethod(),
io.grpc.stub.ServerCalls.asyncBidiStreamingCall(
new MethodHandlers<
istio.mcp.v1alpha1.Mcp.Resources,
istio.mcp.v1alpha1.Mcp.RequestResources>(
service, METHODID_ESTABLISH_RESOURCE_STREAM)))
.build();
}
private static abstract class ResourceSinkBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
ResourceSinkBaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return istio.mcp.v1alpha1.Mcp.getDescriptor();
}
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("ResourceSink");
}
}
private static final class ResourceSinkFileDescriptorSupplier
extends ResourceSinkBaseDescriptorSupplier {
ResourceSinkFileDescriptorSupplier() {}
}
private static final class ResourceSinkMethodDescriptorSupplier
extends ResourceSinkBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final java.lang.String methodName;
ResourceSinkMethodDescriptorSupplier(java.lang.String methodName) {
this.methodName = methodName;
}
@java.lang.Override
public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() {
return getServiceDescriptor().findMethodByName(methodName);
}
}
private static volatile io.grpc.ServiceDescriptor serviceDescriptor;
public static io.grpc.ServiceDescriptor getServiceDescriptor() {
io.grpc.ServiceDescriptor result = serviceDescriptor;
if (result == null) {
synchronized (ResourceSinkGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new ResourceSinkFileDescriptorSupplier())
.addMethod(getEstablishResourceStreamMethod())
.build();
}
}
}
return result;
}
}