aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/server/ServerCommand.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/server/ServerCommand.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/server/ServerCommand.java15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/server/ServerCommand.java b/src/main/java/com/google/devtools/build/lib/server/ServerCommand.java
index ef5f727bdb..f0574cdbaa 100644
--- a/src/main/java/com/google/devtools/build/lib/server/ServerCommand.java
+++ b/src/main/java/com/google/devtools/build/lib/server/ServerCommand.java
@@ -15,8 +15,10 @@ package com.google.devtools.build.lib.server;
import com.google.devtools.build.lib.runtime.BlazeCommandDispatcher;
import com.google.devtools.build.lib.runtime.proto.InvocationPolicyOuterClass.InvocationPolicy;
+import com.google.devtools.build.lib.util.Pair;
import com.google.devtools.build.lib.util.io.OutErr;
import java.util.List;
+import java.util.Optional;
/**
* The {@link RPCServer} calls an arbitrary command implementing this
@@ -25,8 +27,13 @@ import java.util.List;
public interface ServerCommand {
/**
- * Executes the request, writing any output or error messages into err.
- * Returns 0 on success; any other value or exception indicates an error.
+ * Executes the request, writing any output or error messages into err. Returns 0 on success; any
+ * other value or exception indicates an error.
+ *
+ * @param startupOptionsTaggedWithBazelRc List of startup options in Pair(bazelRc, option) form.
+ * The empty string bazelRc is interpreted as the command line, and option should be in
+ * --[no]flag or --flag=value form. If we don't have access to this information (--batch),
+ * leave this parameter as Optional.empty().
*/
int exec(
InvocationPolicy policy,
@@ -34,7 +41,9 @@ public interface ServerCommand {
OutErr outErr,
BlazeCommandDispatcher.LockingMode lockingMode,
String clientDescription,
- long firstContactTime) throws InterruptedException;
+ long firstContactTime,
+ Optional<List<Pair<String, String>>> startupOptionsTaggedWithBazelRc)
+ throws InterruptedException;
/**
* Whether the server needs to be shut down.