aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/buildeventservice/client/UnmanagedBuildEventServiceGrpcClient.java
diff options
context:
space:
mode:
authorGravatar lpino <lpino@google.com>2018-05-16 10:07:56 -0700
committerGravatar Copybara-Service <copybara-piper@google.com>2018-05-16 10:09:33 -0700
commit238079669ec280a972adf68ee987c5d407e15b26 (patch)
treeece1e717346932432adea5328026069c34138b19 /src/main/java/com/google/devtools/build/lib/buildeventservice/client/UnmanagedBuildEventServiceGrpcClient.java
parent6236c178845cb83cb017c054cbe222e5b17de47e (diff)
Create {Un}ManagedBuildEventServiceGrpcClient to allow customization of the channel used to connect with BES.
RELNOTES: none. PiperOrigin-RevId: 196845127
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/buildeventservice/client/UnmanagedBuildEventServiceGrpcClient.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/buildeventservice/client/UnmanagedBuildEventServiceGrpcClient.java34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/buildeventservice/client/UnmanagedBuildEventServiceGrpcClient.java b/src/main/java/com/google/devtools/build/lib/buildeventservice/client/UnmanagedBuildEventServiceGrpcClient.java
new file mode 100644
index 0000000000..2c0a55183d
--- /dev/null
+++ b/src/main/java/com/google/devtools/build/lib/buildeventservice/client/UnmanagedBuildEventServiceGrpcClient.java
@@ -0,0 +1,34 @@
+// Copyright 2018 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.buildeventservice.client;
+
+import io.grpc.CallCredentials;
+import io.grpc.Channel;
+import javax.annotation.Nullable;
+
+/**
+ * Implementation of BuildEventServiceClient that uploads data using gRPC and is <b>not</b>
+ * responsible for closing the channel used to communicate with BES.
+ */
+public class UnmanagedBuildEventServiceGrpcClient extends BuildEventServiceGrpcClient {
+ public UnmanagedBuildEventServiceGrpcClient(
+ Channel channel, @Nullable CallCredentials callCredentials) {
+ super(channel, callCredentials);
+ }
+
+ @Override
+ public void shutdown() throws InterruptedException {
+ // Nothing to do. We handle an unmanaged channel so it's not our responsibility to shut it down.
+ }
+}