blob: b032b0d65da41aca4199ee96f7cfcd768fac7e90 [file] [log] [blame]
aehlig617bb892017-04-04 15:03:23 +00001// Copyright 2017 The Bazel Authors. All rights reserved.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15package com.google.devtools.build.lib.buildeventstream;
16
17/**
18 * Interface for providing {@link BuildEvent}s with the convertes needed for computing the protobuf
19 * representation.
20 */
ulfjack26e586d2018-05-17 08:42:13 -070021public interface BuildEventContext {
aehlig617bb892017-04-04 15:03:23 +000022 /**
Benjamin Petersondac096c2019-03-22 10:29:40 -070023 * Return the {@link PathConverter} to be used in order to obtain URIs for the file paths to be
24 * reported in the event.
aehlig617bb892017-04-04 15:03:23 +000025 */
26 PathConverter pathConverter();
Klaus Aehligee3e1922017-04-07 14:25:27 +000027
28 /**
shahandae78fa2018-04-09 01:30:08 -070029 * Return the {@link ArtifactGroupNamer} that can be used to refer to a {@code
ulfjack26e586d2018-05-17 08:42:13 -070030 * NestedSet<Artifact>} declared via the {@link
31 * com.google.devtools.build.lib.actions.EventReportingArtifacts} interface.
Klaus Aehligee3e1922017-04-07 14:25:27 +000032 */
33 ArtifactGroupNamer artifactGroupNamer();
ulfjackfbf27562018-05-18 12:46:54 -070034
35 /**
36 * Returns the options for the build event stream.
37 */
38 BuildEventProtocolOptions getOptions();
aehlig617bb892017-04-04 15:03:23 +000039}