forked from cloudfoundry/cf-java-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApplications.java
More file actions
267 lines (235 loc) · 8.04 KB
/
Applications.java
File metadata and controls
267 lines (235 loc) · 8.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
/*
* Copyright 2013-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.cloudfoundry.operations.applications;
import org.cloudfoundry.doppler.LogMessage;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
/**
* Main entry point to the Cloud Foundry Applications Operations API
*/
public interface Applications {
/**
* Copy the source code from this application to another.
*
* @param request the copy source application request
* @return a completion indicator
*/
Mono<Void> copySource(CopySourceApplicationRequest request);
/**
* Deletes a specific application and, optionally, all routes mapped to the application.
* <p>
* Warning: deleting routes mapped to the application deletes them even if they are mapped to other applications.
*
* @param request the delete application request
* @return a completion indicator
*/
Mono<Void> delete(DeleteApplicationRequest request);
/**
* Disable SSH for a specific application
*
* @param request the disable application ssh request
* @return a completion indicator
*/
Mono<Void> disableSsh(DisableApplicationSshRequest request);
/**
* Enable SSH for a specific application
*
* @param request the enable application ssh request
* @return a completion indicator
*/
Mono<Void> enableSsh(EnableApplicationSshRequest request);
/**
* Gets information for a specific application
*
* @param request the get application request
* @return the application
*/
Mono<ApplicationDetail> get(GetApplicationRequest request);
/**
* Gets the manifest for a specific application
*
* @param request the get application manifest request
* @return the application manifest
*/
Mono<ApplicationManifest> getApplicationManifest(GetApplicationManifestRequest request);
/**
* Gets the environment variables for an application
*
* @param request the get application environments request
* @return the application environments
*/
Mono<ApplicationEnvironments> getEnvironments(GetApplicationEnvironmentsRequest request);
/**
* Gets recent events of an application.
*
* @param request the get application events request
* @return the events
*/
Flux<ApplicationEvent> getEvents(GetApplicationEventsRequest request);
/**
* Retrieve the Health Check Type of an application
*
* @param request the get health check request
* @return the health check
*/
Mono<ApplicationHealthCheck> getHealthCheck(GetApplicationHealthCheckRequest request);
/**
* Lists the applications
*
* @return the applications
*/
Flux<ApplicationSummary> list();
/**
* Lists the tasks for an application
*
* @param request the list tasks request
* @return the tasks
*/
Flux<Task> listTasks(ListApplicationTasksRequest request);
/**
* List the applications logs. Uses Doppler under the hood.
* Only works with {@code Loggregator < 107.0}, shipped in {@code CFD < 24.3}
* and {@code TAS < 4.0}.
*
* @param request the application logs request
* @return the applications logs
* @deprecated Use {@link #logs(ApplicationLogsRequest)} instead.
*/
@Deprecated
Flux<LogMessage> logs(LogsRequest request);
/**
* List the applications logs.
* Uses Log Cache under the hood when {@link ApplicationLogsRequest#getRecent()} is {@code true}.
* Streaming logs still use Doppler, which is not available in deployments following
* <a href="https://docs.cloudfoundry.org/loggregator/architecture.html#shared-nothing-architecture">shared-nothing architecture</a>.
*
* @param request the application logs request
* @return the applications logs
*/
Flux<ApplicationLog> logs(ApplicationLogsRequest request);
/**
* Push a specific application
*
* @param request the push application request
* @return a completion indicator
*/
Mono<Void> push(PushApplicationRequest request);
/**
* Push a manifest
*
* @param request the push manifest request
* @return a completion indicator
*/
Mono<Void> pushManifest(PushApplicationManifestRequest request);
/**
* Push a manifest using the V3 API
*
* @param request the push manifest V3 request
* @return a completion indicator
*/
Mono<Void> pushManifestV3(PushManifestV3Request request);
/**
* Rename a specific application
*
* @param request the rename application request
* @return a completion indicator
*/
Mono<Void> rename(RenameApplicationRequest request);
/**
* Restarts a specific application
*
* @param request the restart application request
* @return a completion indicator
*/
Mono<Void> restage(RestageApplicationRequest request);
/**
* Restarts a specific application
*
* @param request the restart application request
* @return a completion indicator
*/
Mono<Void> restart(RestartApplicationRequest request);
/**
* Restart a specific application instance
*
* @param request the restart application instance request
* @return a completion indicator
*/
Mono<Void> restartInstance(RestartApplicationInstanceRequest request);
/**
* Run a one-off task on an application
*
* @param request the run task request
* @return the task
*/
Mono<Task> runTask(RunApplicationTaskRequest request);
/**
* Terminate a running task of an application
*
* @param request the terminate task request
* @return a completion indicator
*/
Mono<Void> terminateTask(TerminateApplicationTaskRequest request);
/**
* Scales a specific application
*
* @param request the scale application request
* @return a completion indicator
*/
Mono<Void> scale(ScaleApplicationRequest request);
/**
* Set an environment variable of an application
*
* @param request the set environment variable request
* @return a completion indicator
*/
Mono<Void> setEnvironmentVariable(SetEnvironmentVariableApplicationRequest request);
/**
* Set the Health Check Type of an application
*
* @param request the set health check request
* @return a completion indicator
*/
Mono<Void> setHealthCheck(SetApplicationHealthCheckRequest request);
/**
* Check if SSH is enabled for a specific application
*
* @param request the check application ssh enabled request
* @return Boolean is ssh enabled on the application
*/
Mono<Boolean> sshEnabled(ApplicationSshEnabledRequest request);
/**
* Starts a specific application or, if the application is already started, simply returns.
*
* @param request the start application request
* @return a completion indicator
*/
Mono<Void> start(StartApplicationRequest request);
/**
* Stops a specific application or, if the application is already stopped, simply returns.
*
* @param request the stop application request
* @return a completion indicator
*/
Mono<Void> stop(StopApplicationRequest request);
/**
* Unset an environment variable of an application
*
* @param request the unset environment variable request
* @return a completion indicator
*/
Mono<Void> unsetEnvironmentVariable(UnsetEnvironmentVariableApplicationRequest request);
}