From bbcf2032f55bd989dabb053eb52d89d3ef5cefa7 Mon Sep 17 00:00:00 2001 From: lberki Date: Tue, 6 Feb 2018 10:11:56 -0800 Subject: Delete the now-useless interfaces ServerCommand and CommandExecutor. We apparently don't have any other implementations of these interfaces than BlazeCommandDispatcher, so let's not have them at all; we can always put back an interface with the exec() method if need be. RELNOTES: None. PiperOrigin-RevId: 184698573 --- .../devtools/build/lib/server/ServerCommand.java | 48 ---------------------- 1 file changed, 48 deletions(-) delete mode 100644 src/main/java/com/google/devtools/build/lib/server/ServerCommand.java (limited to 'src/main/java/com/google/devtools/build/lib/server/ServerCommand.java') 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 deleted file mode 100644 index c47e12853d..0000000000 --- a/src/main/java/com/google/devtools/build/lib/server/ServerCommand.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright 2014 The Bazel Authors. All rights reserved. -// -// 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 com.google.devtools.build.lib.server; - -import com.google.devtools.build.lib.runtime.BlazeCommandDispatcher; -import com.google.devtools.build.lib.runtime.BlazeCommandResult; -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 - * interface. - */ -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. - * - * @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(). - */ - BlazeCommandResult exec( - InvocationPolicy policy, - List args, - OutErr outErr, - BlazeCommandDispatcher.LockingMode lockingMode, - String clientDescription, - long firstContactTime, - Optional>> startupOptionsTaggedWithBazelRc) - throws InterruptedException; -} -- cgit v1.2.3