1 /*
2  * Server.java
3  *
4  * Copyright (C) 2021 by RStudio, PBC
5  *
6  * Unless you have received this program directly from RStudio pursuant
7  * to the terms of a commercial license agreement with RStudio, then
8  * this program is licensed to you under the terms of version 3 of the
9  * GNU Affero General Public License. This program is distributed WITHOUT
10  * ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING THOSE OF NON-INFRINGEMENT,
11  * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Please refer to the
12  * AGPL (http://www.gnu.org/licenses/agpl-3.0.txt) for more details.
13  *
14  */
15 
16 package org.rstudio.studio.client.server;
17 
18 import org.rstudio.studio.client.application.model.ApplicationServerOperations;
19 import org.rstudio.studio.client.common.plumber.model.PlumberServerOperations;
20 import org.rstudio.studio.client.common.rstudioapi.model.RStudioAPIServerOperations;
21 import org.rstudio.studio.client.common.shiny.model.ShinyServerOperations;
22 import org.rstudio.studio.client.htmlpreview.model.HTMLPreviewServerOperations;
23 import org.rstudio.studio.client.rsconnect.model.RSConnectServerOperations;
24 import org.rstudio.studio.client.sql.model.SqlServerOperations;
25 import org.rstudio.studio.client.workbench.model.WorkbenchServerOperations;
26 
27 public interface Server extends ApplicationServerOperations,
28                                 WorkbenchServerOperations,
29                                 HTMLPreviewServerOperations,
30                                 SqlServerOperations,
31                                 ShinyServerOperations,
32                                 RSConnectServerOperations,
33                                 RStudioAPIServerOperations,
34                                 PlumberServerOperations
35 {
36    /**
37     * Add an entry to the server's log.
38     *
39     * @param logEntryType     see LogEntryType.ERROR, ec.
40     * @param logEntry         log entry (should not include newlines)
41     * @param requestCallback  handle errors
42     */
log(int logEntryType, String logEntry, ServerRequestCallback<Void> requestCallback)43    void log(int logEntryType,
44             String logEntry,
45             ServerRequestCallback<Void> requestCallback);
46 
logException(ClientException e, ServerRequestCallback<Void> requestCallback)47    void logException(ClientException e,
48                      ServerRequestCallback<Void> requestCallback);
49 }
50