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.
* Updates an existing topic. Note that certain properties of a topic are not
* modifiable. Options settings follow the style guide:
* NOTE: The style guide requires body: "topic" instead of body: "*".
* Keeping the latter for internal consistency in V1, however it should be
* corrected in V2. See
* https://cloud.google.com/apis/design/standard_methods#update for details.
*
* Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic
* does not exist. The message payload must not be empty; it must contain
* either a non-empty data field, or at least one attribute.
*
* Deletes the topic with the given name. Returns `NOT_FOUND` if the topic
* does not exist. After a topic is deleted, a new topic may be created with
* the same name; this is an entirely new topic with none of the old
* configuration or subscriptions. Existing subscriptions to this topic are
* not deleted, but their `topic` field is set to `_deleted-topic_`.
*
*/
public void deleteTopic(com.google.pubsub.v1.DeleteTopicRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(getDeleteTopicMethodHelper(), responseObserver);
}
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
getCreateTopicMethodHelper(),
asyncUnaryCall(
new MethodHandlers<
com.google.pubsub.v1.Topic,
com.google.pubsub.v1.Topic>(
this, METHODID_CREATE_TOPIC)))
.addMethod(
getUpdateTopicMethodHelper(),
asyncUnaryCall(
new MethodHandlers<
com.google.pubsub.v1.UpdateTopicRequest,
com.google.pubsub.v1.Topic>(
this, METHODID_UPDATE_TOPIC)))
.addMethod(
getPublishMethodHelper(),
asyncUnaryCall(
new MethodHandlers<
com.google.pubsub.v1.PublishRequest,
com.google.pubsub.v1.PublishResponse>(
this, METHODID_PUBLISH)))
.addMethod(
getGetTopicMethodHelper(),
asyncUnaryCall(
new MethodHandlers<
com.google.pubsub.v1.GetTopicRequest,
com.google.pubsub.v1.Topic>(
this, METHODID_GET_TOPIC)))
.addMethod(
getListTopicsMethodHelper(),
asyncUnaryCall(
new MethodHandlers<
com.google.pubsub.v1.ListTopicsRequest,
com.google.pubsub.v1.ListTopicsResponse>(
this, METHODID_LIST_TOPICS)))
.addMethod(
getListTopicSubscriptionsMethodHelper(),
asyncUnaryCall(
new MethodHandlers<
com.google.pubsub.v1.ListTopicSubscriptionsRequest,
com.google.pubsub.v1.ListTopicSubscriptionsResponse>(
this, METHODID_LIST_TOPIC_SUBSCRIPTIONS)))
.addMethod(
getDeleteTopicMethodHelper(),
asyncUnaryCall(
new MethodHandlers<
com.google.pubsub.v1.DeleteTopicRequest,
com.google.protobuf.Empty>(
this, METHODID_DELETE_TOPIC)))
.build();
}
}
/**
*
* The service that an application uses to manipulate topics, and to send
* messages to a topic.
*
*/
public static final class PublisherStub extends io.grpc.stub.AbstractStub {
private PublisherStub(io.grpc.Channel channel) {
super(channel);
}
private PublisherStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected PublisherStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new PublisherStub(channel, callOptions);
}
/**
*
* Updates an existing topic. Note that certain properties of a topic are not
* modifiable. Options settings follow the style guide:
* NOTE: The style guide requires body: "topic" instead of body: "*".
* Keeping the latter for internal consistency in V1, however it should be
* corrected in V2. See
* https://cloud.google.com/apis/design/standard_methods#update for details.
*
* Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic
* does not exist. The message payload must not be empty; it must contain
* either a non-empty data field, or at least one attribute.
*
* Deletes the topic with the given name. Returns `NOT_FOUND` if the topic
* does not exist. After a topic is deleted, a new topic may be created with
* the same name; this is an entirely new topic with none of the old
* configuration or subscriptions. Existing subscriptions to this topic are
* not deleted, but their `topic` field is set to `_deleted-topic_`.
*
* Updates an existing topic. Note that certain properties of a topic are not
* modifiable. Options settings follow the style guide:
* NOTE: The style guide requires body: "topic" instead of body: "*".
* Keeping the latter for internal consistency in V1, however it should be
* corrected in V2. See
* https://cloud.google.com/apis/design/standard_methods#update for details.
*
* Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic
* does not exist. The message payload must not be empty; it must contain
* either a non-empty data field, or at least one attribute.
*
* Deletes the topic with the given name. Returns `NOT_FOUND` if the topic
* does not exist. After a topic is deleted, a new topic may be created with
* the same name; this is an entirely new topic with none of the old
* configuration or subscriptions. Existing subscriptions to this topic are
* not deleted, but their `topic` field is set to `_deleted-topic_`.
*
* Updates an existing topic. Note that certain properties of a topic are not
* modifiable. Options settings follow the style guide:
* NOTE: The style guide requires body: "topic" instead of body: "*".
* Keeping the latter for internal consistency in V1, however it should be
* corrected in V2. See
* https://cloud.google.com/apis/design/standard_methods#update for details.
*
* Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic
* does not exist. The message payload must not be empty; it must contain
* either a non-empty data field, or at least one attribute.
*
* Deletes the topic with the given name. Returns `NOT_FOUND` if the topic
* does not exist. After a topic is deleted, a new topic may be created with
* the same name; this is an entirely new topic with none of the old
* configuration or subscriptions. Existing subscriptions to this topic are
* not deleted, but their `topic` field is set to `_deleted-topic_`.
*
*/
public com.google.common.util.concurrent.ListenableFuture deleteTopic(
com.google.pubsub.v1.DeleteTopicRequest request) {
return futureUnaryCall(
getChannel().newCall(getDeleteTopicMethodHelper(), getCallOptions()), request);
}
}
private static final int METHODID_CREATE_TOPIC = 0;
private static final int METHODID_UPDATE_TOPIC = 1;
private static final int METHODID_PUBLISH = 2;
private static final int METHODID_GET_TOPIC = 3;
private static final int METHODID_LIST_TOPICS = 4;
private static final int METHODID_LIST_TOPIC_SUBSCRIPTIONS = 5;
private static final int METHODID_DELETE_TOPIC = 6;
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 PublisherImplBase serviceImpl;
private final int methodId;
MethodHandlers(PublisherImplBase 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_CREATE_TOPIC:
serviceImpl.createTopic((com.google.pubsub.v1.Topic) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_UPDATE_TOPIC:
serviceImpl.updateTopic((com.google.pubsub.v1.UpdateTopicRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_PUBLISH:
serviceImpl.publish((com.google.pubsub.v1.PublishRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_GET_TOPIC:
serviceImpl.getTopic((com.google.pubsub.v1.GetTopicRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_LIST_TOPICS:
serviceImpl.listTopics((com.google.pubsub.v1.ListTopicsRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_LIST_TOPIC_SUBSCRIPTIONS:
serviceImpl.listTopicSubscriptions((com.google.pubsub.v1.ListTopicSubscriptionsRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_DELETE_TOPIC:
serviceImpl.deleteTopic((com.google.pubsub.v1.DeleteTopicRequest) 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();
}
}
}
private static abstract class PublisherBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
PublisherBaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return com.google.pubsub.v1.PubsubProto.getDescriptor();
}
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("Publisher");
}
}
private static final class PublisherFileDescriptorSupplier
extends PublisherBaseDescriptorSupplier {
PublisherFileDescriptorSupplier() {}
}
private static final class PublisherMethodDescriptorSupplier
extends PublisherBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final String methodName;
PublisherMethodDescriptorSupplier(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 (PublisherGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new PublisherFileDescriptorSupplier())
.addMethod(getCreateTopicMethodHelper())
.addMethod(getUpdateTopicMethodHelper())
.addMethod(getPublishMethodHelper())
.addMethod(getGetTopicMethodHelper())
.addMethod(getListTopicsMethodHelper())
.addMethod(getListTopicSubscriptionsMethodHelper())
.addMethod(getDeleteTopicMethodHelper())
.build();
}
}
}
return result;
}
}