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

main.grpc.pbx.PluginGrpc Maven / Gradle / Ivy

There is a newer version: 5.133.1
Show newest version
package pbx;

import static io.grpc.MethodDescriptor.generateFullMethodName;

/**
 * 
 * Plugin interface.
 * 
*/ @javax.annotation.Generated( value = "by gRPC proto compiler (version 1.65.1)", comments = "Source: pbx/model.proto") @io.grpc.stub.annotations.GrpcGenerated public final class PluginGrpc { private PluginGrpc() {} public static final java.lang.String SERVICE_NAME = "pbx.Plugin"; // Static method descriptors that strictly reflect the proto. private static volatile io.grpc.MethodDescriptor getFireHoseMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "FireHose", requestType = pbx.Model.ClientReq.class, responseType = pbx.Model.ServerResp.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor getFireHoseMethod() { io.grpc.MethodDescriptor getFireHoseMethod; if ((getFireHoseMethod = PluginGrpc.getFireHoseMethod) == null) { synchronized (PluginGrpc.class) { if ((getFireHoseMethod = PluginGrpc.getFireHoseMethod) == null) { PluginGrpc.getFireHoseMethod = getFireHoseMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "FireHose")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller( pbx.Model.ClientReq.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller( pbx.Model.ServerResp.getDefaultInstance())) .build(); } } } return getFireHoseMethod; } private static volatile io.grpc.MethodDescriptor getFindMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "Find", requestType = pbx.Model.SearchQuery.class, responseType = pbx.Model.SearchFound.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor getFindMethod() { io.grpc.MethodDescriptor getFindMethod; if ((getFindMethod = PluginGrpc.getFindMethod) == null) { synchronized (PluginGrpc.class) { if ((getFindMethod = PluginGrpc.getFindMethod) == null) { PluginGrpc.getFindMethod = getFindMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Find")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller( pbx.Model.SearchQuery.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller( pbx.Model.SearchFound.getDefaultInstance())) .build(); } } } return getFindMethod; } private static volatile io.grpc.MethodDescriptor getAccountMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "Account", requestType = pbx.Model.AccountEvent.class, responseType = pbx.Model.Unused.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor getAccountMethod() { io.grpc.MethodDescriptor getAccountMethod; if ((getAccountMethod = PluginGrpc.getAccountMethod) == null) { synchronized (PluginGrpc.class) { if ((getAccountMethod = PluginGrpc.getAccountMethod) == null) { PluginGrpc.getAccountMethod = getAccountMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Account")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller( pbx.Model.AccountEvent.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller( pbx.Model.Unused.getDefaultInstance())) .build(); } } } return getAccountMethod; } private static volatile io.grpc.MethodDescriptor getTopicMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "Topic", requestType = pbx.Model.TopicEvent.class, responseType = pbx.Model.Unused.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor getTopicMethod() { io.grpc.MethodDescriptor getTopicMethod; if ((getTopicMethod = PluginGrpc.getTopicMethod) == null) { synchronized (PluginGrpc.class) { if ((getTopicMethod = PluginGrpc.getTopicMethod) == null) { PluginGrpc.getTopicMethod = getTopicMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Topic")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller( pbx.Model.TopicEvent.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller( pbx.Model.Unused.getDefaultInstance())) .build(); } } } return getTopicMethod; } private static volatile io.grpc.MethodDescriptor getSubscriptionMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "Subscription", requestType = pbx.Model.SubscriptionEvent.class, responseType = pbx.Model.Unused.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor getSubscriptionMethod() { io.grpc.MethodDescriptor getSubscriptionMethod; if ((getSubscriptionMethod = PluginGrpc.getSubscriptionMethod) == null) { synchronized (PluginGrpc.class) { if ((getSubscriptionMethod = PluginGrpc.getSubscriptionMethod) == null) { PluginGrpc.getSubscriptionMethod = getSubscriptionMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Subscription")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller( pbx.Model.SubscriptionEvent.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller( pbx.Model.Unused.getDefaultInstance())) .build(); } } } return getSubscriptionMethod; } private static volatile io.grpc.MethodDescriptor getMessageMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "Message", requestType = pbx.Model.MessageEvent.class, responseType = pbx.Model.Unused.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor getMessageMethod() { io.grpc.MethodDescriptor getMessageMethod; if ((getMessageMethod = PluginGrpc.getMessageMethod) == null) { synchronized (PluginGrpc.class) { if ((getMessageMethod = PluginGrpc.getMessageMethod) == null) { PluginGrpc.getMessageMethod = getMessageMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Message")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller( pbx.Model.MessageEvent.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller( pbx.Model.Unused.getDefaultInstance())) .build(); } } } return getMessageMethod; } /** * Creates a new async stub that supports all call types for the service */ public static PluginStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { @java.lang.Override public PluginStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new PluginStub(channel, callOptions); } }; return PluginStub.newStub(factory, channel); } /** * Creates a new blocking-style stub that supports unary and streaming output calls on the service */ public static PluginBlockingStub newBlockingStub( io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { @java.lang.Override public PluginBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new PluginBlockingStub(channel, callOptions); } }; return PluginBlockingStub.newStub(factory, channel); } /** * Creates a new ListenableFuture-style stub that supports unary calls on the service */ public static PluginFutureStub newFutureStub( io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { @java.lang.Override public PluginFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new PluginFutureStub(channel, callOptions); } }; return PluginFutureStub.newStub(factory, channel); } /** *
   * Plugin interface.
   * 
*/ public interface AsyncService { /** *
     * This plugin method is called by Tinode server for every message received from the clients. The
     * method returns a ServerCtrl message. Non-zero ServerCtrl.code indicates that no further
     * processing is needed. The Tinode server will generate a {ctrl} message from the returned ServerCtrl
     * and forward it to the client session.
     * ServerCtrl.code equals to 0 instructs the server to continue with default processing of the client message.
     * 
*/ default void fireHose(pbx.Model.ClientReq request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getFireHoseMethod(), responseObserver); } /** *
     * An alteranative user and topic discovery mechanism.
     * A search request issued on a 'fnd' topic. This method is called to generate an alternative result set.
     * 
*/ default void find(pbx.Model.SearchQuery request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getFindMethod(), responseObserver); } /** *
     * Account created, updated or deleted
     * 
*/ default void account(pbx.Model.AccountEvent request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAccountMethod(), responseObserver); } /** *
     * Topic created, updated [or deleted -- not supported yet]
     * 
*/ default void topic(pbx.Model.TopicEvent request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getTopicMethod(), responseObserver); } /** *
     * Subscription created, updated or deleted
     * 
*/ default void subscription(pbx.Model.SubscriptionEvent request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSubscriptionMethod(), responseObserver); } /** *
     * Message published or deleted
     * 
*/ default void message(pbx.Model.MessageEvent request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getMessageMethod(), responseObserver); } } /** * Base class for the server implementation of the service Plugin. *
   * Plugin interface.
   * 
*/ public static abstract class PluginImplBase implements io.grpc.BindableService, AsyncService { @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return PluginGrpc.bindService(this); } } /** * A stub to allow clients to do asynchronous rpc calls to service Plugin. *
   * Plugin interface.
   * 
*/ public static final class PluginStub extends io.grpc.stub.AbstractAsyncStub { private PluginStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected PluginStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new PluginStub(channel, callOptions); } /** *
     * This plugin method is called by Tinode server for every message received from the clients. The
     * method returns a ServerCtrl message. Non-zero ServerCtrl.code indicates that no further
     * processing is needed. The Tinode server will generate a {ctrl} message from the returned ServerCtrl
     * and forward it to the client session.
     * ServerCtrl.code equals to 0 instructs the server to continue with default processing of the client message.
     * 
*/ public void fireHose(pbx.Model.ClientReq request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getFireHoseMethod(), getCallOptions()), request, responseObserver); } /** *
     * An alteranative user and topic discovery mechanism.
     * A search request issued on a 'fnd' topic. This method is called to generate an alternative result set.
     * 
*/ public void find(pbx.Model.SearchQuery request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getFindMethod(), getCallOptions()), request, responseObserver); } /** *
     * Account created, updated or deleted
     * 
*/ public void account(pbx.Model.AccountEvent request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getAccountMethod(), getCallOptions()), request, responseObserver); } /** *
     * Topic created, updated [or deleted -- not supported yet]
     * 
*/ public void topic(pbx.Model.TopicEvent request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getTopicMethod(), getCallOptions()), request, responseObserver); } /** *
     * Subscription created, updated or deleted
     * 
*/ public void subscription(pbx.Model.SubscriptionEvent request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getSubscriptionMethod(), getCallOptions()), request, responseObserver); } /** *
     * Message published or deleted
     * 
*/ public void message(pbx.Model.MessageEvent request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getMessageMethod(), getCallOptions()), request, responseObserver); } } /** * A stub to allow clients to do synchronous rpc calls to service Plugin. *
   * Plugin interface.
   * 
*/ public static final class PluginBlockingStub extends io.grpc.stub.AbstractBlockingStub { private PluginBlockingStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected PluginBlockingStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new PluginBlockingStub(channel, callOptions); } /** *
     * This plugin method is called by Tinode server for every message received from the clients. The
     * method returns a ServerCtrl message. Non-zero ServerCtrl.code indicates that no further
     * processing is needed. The Tinode server will generate a {ctrl} message from the returned ServerCtrl
     * and forward it to the client session.
     * ServerCtrl.code equals to 0 instructs the server to continue with default processing of the client message.
     * 
*/ public pbx.Model.ServerResp fireHose(pbx.Model.ClientReq request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getFireHoseMethod(), getCallOptions(), request); } /** *
     * An alteranative user and topic discovery mechanism.
     * A search request issued on a 'fnd' topic. This method is called to generate an alternative result set.
     * 
*/ public pbx.Model.SearchFound find(pbx.Model.SearchQuery request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getFindMethod(), getCallOptions(), request); } /** *
     * Account created, updated or deleted
     * 
*/ public pbx.Model.Unused account(pbx.Model.AccountEvent request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getAccountMethod(), getCallOptions(), request); } /** *
     * Topic created, updated [or deleted -- not supported yet]
     * 
*/ public pbx.Model.Unused topic(pbx.Model.TopicEvent request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getTopicMethod(), getCallOptions(), request); } /** *
     * Subscription created, updated or deleted
     * 
*/ public pbx.Model.Unused subscription(pbx.Model.SubscriptionEvent request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getSubscriptionMethod(), getCallOptions(), request); } /** *
     * Message published or deleted
     * 
*/ public pbx.Model.Unused message(pbx.Model.MessageEvent request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getMessageMethod(), getCallOptions(), request); } } /** * A stub to allow clients to do ListenableFuture-style rpc calls to service Plugin. *
   * Plugin interface.
   * 
*/ public static final class PluginFutureStub extends io.grpc.stub.AbstractFutureStub { private PluginFutureStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected PluginFutureStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new PluginFutureStub(channel, callOptions); } /** *
     * This plugin method is called by Tinode server for every message received from the clients. The
     * method returns a ServerCtrl message. Non-zero ServerCtrl.code indicates that no further
     * processing is needed. The Tinode server will generate a {ctrl} message from the returned ServerCtrl
     * and forward it to the client session.
     * ServerCtrl.code equals to 0 instructs the server to continue with default processing of the client message.
     * 
*/ public com.google.common.util.concurrent.ListenableFuture fireHose( pbx.Model.ClientReq request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getFireHoseMethod(), getCallOptions()), request); } /** *
     * An alteranative user and topic discovery mechanism.
     * A search request issued on a 'fnd' topic. This method is called to generate an alternative result set.
     * 
*/ public com.google.common.util.concurrent.ListenableFuture find( pbx.Model.SearchQuery request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getFindMethod(), getCallOptions()), request); } /** *
     * Account created, updated or deleted
     * 
*/ public com.google.common.util.concurrent.ListenableFuture account( pbx.Model.AccountEvent request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getAccountMethod(), getCallOptions()), request); } /** *
     * Topic created, updated [or deleted -- not supported yet]
     * 
*/ public com.google.common.util.concurrent.ListenableFuture topic( pbx.Model.TopicEvent request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getTopicMethod(), getCallOptions()), request); } /** *
     * Subscription created, updated or deleted
     * 
*/ public com.google.common.util.concurrent.ListenableFuture subscription( pbx.Model.SubscriptionEvent request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getSubscriptionMethod(), getCallOptions()), request); } /** *
     * Message published or deleted
     * 
*/ public com.google.common.util.concurrent.ListenableFuture message( pbx.Model.MessageEvent request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getMessageMethod(), getCallOptions()), request); } } private static final int METHODID_FIRE_HOSE = 0; private static final int METHODID_FIND = 1; private static final int METHODID_ACCOUNT = 2; private static final int METHODID_TOPIC = 3; private static final int METHODID_SUBSCRIPTION = 4; private static final int METHODID_MESSAGE = 5; 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) { case METHODID_FIRE_HOSE: serviceImpl.fireHose((pbx.Model.ClientReq) request, (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_FIND: serviceImpl.find((pbx.Model.SearchQuery) request, (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_ACCOUNT: serviceImpl.account((pbx.Model.AccountEvent) request, (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_TOPIC: serviceImpl.topic((pbx.Model.TopicEvent) request, (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_SUBSCRIPTION: serviceImpl.subscription((pbx.Model.SubscriptionEvent) request, (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_MESSAGE: serviceImpl.message((pbx.Model.MessageEvent) 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 final io.grpc.ServerServiceDefinition bindService(AsyncService service) { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( getFireHoseMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< pbx.Model.ClientReq, pbx.Model.ServerResp>( service, METHODID_FIRE_HOSE))) .addMethod( getFindMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< pbx.Model.SearchQuery, pbx.Model.SearchFound>( service, METHODID_FIND))) .addMethod( getAccountMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< pbx.Model.AccountEvent, pbx.Model.Unused>( service, METHODID_ACCOUNT))) .addMethod( getTopicMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< pbx.Model.TopicEvent, pbx.Model.Unused>( service, METHODID_TOPIC))) .addMethod( getSubscriptionMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< pbx.Model.SubscriptionEvent, pbx.Model.Unused>( service, METHODID_SUBSCRIPTION))) .addMethod( getMessageMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< pbx.Model.MessageEvent, pbx.Model.Unused>( service, METHODID_MESSAGE))) .build(); } private static volatile io.grpc.ServiceDescriptor serviceDescriptor; public static io.grpc.ServiceDescriptor getServiceDescriptor() { io.grpc.ServiceDescriptor result = serviceDescriptor; if (result == null) { synchronized (PluginGrpc.class) { result = serviceDescriptor; if (result == null) { serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .addMethod(getFireHoseMethod()) .addMethod(getFindMethod()) .addMethod(getAccountMethod()) .addMethod(getTopicMethod()) .addMethod(getSubscriptionMethod()) .addMethod(getMessageMethod()) .build(); } } } return result; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy