@@ -79,32 +79,126 @@ interface PullFuture extends Future<PullResponse> {
79
79
void addCallback (final PullCallback callback );
80
80
}
81
81
82
- // in all cases root cause of ExecutionException is PubSubException
82
+ /**
83
+ * Sends a request to create a topic. This method returns a {@code Future} object to consume the
84
+ * result. {@link Future#get()} returns the created topic.
85
+ *
86
+ * @param topic the topic to create
87
+ */
83
88
Future <Topic > create (Topic topic );
84
89
90
+ /**
91
+ * Sends a request to publish messages. This method returns a {@code Future} object to consume the
92
+ * result. {@link Future#get()} returns a response object containing the publish result.
93
+ *
94
+ * @param request the request object containing all of the parameters for the API call
95
+ */
85
96
Future <PublishResponse > publish (PublishRequest request );
86
97
98
+ /**
99
+ * Sends a request to get a topic. This method returns a {@code Future} object to consume the
100
+ * result. {@link Future#get()} returns the requested topic or {@code null} if not found.
101
+ *
102
+ * @param request the request object containing all of the parameters for the API call
103
+ */
87
104
Future <Topic > get (GetTopicRequest request );
88
105
106
+ /**
107
+ * Sends a request to list the topics in a project. This method returns a {@code Future} object to
108
+ * consume the result. {@link Future#get()} returns a response object containing the listing
109
+ * result.
110
+ *
111
+ * @param request the request object containing all of the parameters for the API call
112
+ */
89
113
Future <ListTopicsResponse > list (ListTopicsRequest request );
90
114
115
+ /**
116
+ * Sends a request to list the subscriptions for a topic. This method returns a {@code Future}
117
+ * object to consume the result. {@link Future#get()} returns a response object containing the
118
+ * listing result.
119
+ *
120
+ * @param request the request object containing all of the parameters for the API call
121
+ */
91
122
Future <ListTopicSubscriptionsResponse > list (ListTopicSubscriptionsRequest request );
92
123
124
+ /**
125
+ * Sends a request to delete a topic. This method returns a {@code Future} object to consume the
126
+ * result. {@link Future#get()} returns {@link Empty#getDefaultInstance()} or {@code null} if the
127
+ * topic was not found.
128
+ *
129
+ * @param request the request object containing all of the parameters for the API call
130
+ */
93
131
Future <Empty > delete (DeleteTopicRequest request );
94
132
133
+ /**
134
+ * Sends a request to create a subscription. This method returns a {@code Future} object to
135
+ * consume the result. {@link Future#get()} returns the created subscription.
136
+ *
137
+ * @param subscription the subscription to create
138
+ */
95
139
Future <Subscription > create (Subscription subscription );
96
140
141
+ /**
142
+ * Sends a request to get a subscription. This method returns a {@code Future} object to consume
143
+ * the result. {@link Future#get()} returns the requested subscription or {@code null} if not
144
+ * found.
145
+ *
146
+ * @param request the request object containing all of the parameters for the API call
147
+ */
97
148
Future <Subscription > get (GetSubscriptionRequest request );
98
149
150
+ /**
151
+ * Sends a request to list the subscriptions in a project. This method returns a {@code Future}
152
+ * object to consume the result. {@link Future#get()} returns a response object containing the
153
+ * listing result.
154
+ *
155
+ * @param request the request object containing all of the parameters for the API call
156
+ */
99
157
Future <ListSubscriptionsResponse > list (ListSubscriptionsRequest request );
100
158
159
+ /**
160
+ * Sends a request to delete a subscription. This method returns a {@code Future} object to
161
+ * consume the result. {@link Future#get()} returns {@link Empty#getDefaultInstance()} or
162
+ * {@code null} if the subscription was not found.
163
+ *
164
+ * @param request the request object containing all of the parameters for the API call
165
+ */
101
166
Future <Empty > delete (DeleteSubscriptionRequest request );
102
167
168
+ /**
169
+ * Sends a request to modify the acknowledge deadline of a subscription. This method returns a
170
+ * {@code Future} object to consume the result. {@link Future#get()} returns
171
+ * {@link Empty#getDefaultInstance()} if the request was issued correctly.
172
+ *
173
+ * @param request the request object containing all of the parameters for the API call
174
+ */
103
175
Future <Empty > modify (ModifyAckDeadlineRequest request );
104
176
177
+ /**
178
+ * Sends a request to acknowledge messages for a subscription. This method returns a
179
+ * {@code Future} object to consume the result. {@link Future#get()} returns
180
+ * {@link Empty#getDefaultInstance()} if the request was issued correctly.
181
+ *
182
+ * @param request the request object containing all of the parameters for the API call
183
+ */
105
184
Future <Empty > acknowledge (AcknowledgeRequest request );
106
185
186
+ /**
187
+ * Sends a request to pull messages from a subscription. This method returns a {@link PullFuture}
188
+ * object to consume the result. {@link PullFuture#get()} returns a response object containing the
189
+ * pulled messages. {@link PullFuture#addCallback(PullCallback)} can be used to register a
190
+ * callback for the request's completion.
191
+ *
192
+ * @param request the request object containing all of the parameters for the API call
193
+ */
107
194
PullFuture pull (PullRequest request );
108
195
196
+ /**
197
+ * Sends a request to modify the push configuration of a subscription. This method returns a
198
+ * {@code Future} object to consume the result. {@link Future#get()} returns
199
+ * {@link Empty#getDefaultInstance()} if the request was issued correctly.
200
+ *
201
+ * @param request the request object containing all of the parameters for the API call
202
+ */
109
203
Future <Empty > modify (ModifyPushConfigRequest request );
110
204
}
0 commit comments