aehlig | 617bb89 | 2017-04-04 15:03:23 +0000 | [diff] [blame] | 1 | // 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 | |
| 15 | package 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 | */ |
ulfjack | 26e586d | 2018-05-17 08:42:13 -0700 | [diff] [blame] | 21 | public interface BuildEventContext { |
aehlig | 617bb89 | 2017-04-04 15:03:23 +0000 | [diff] [blame] | 22 | /** |
Benjamin Peterson | dac096c | 2019-03-22 10:29:40 -0700 | [diff] [blame] | 23 | * Return the {@link PathConverter} to be used in order to obtain URIs for the file paths to be |
| 24 | * reported in the event. |
aehlig | 617bb89 | 2017-04-04 15:03:23 +0000 | [diff] [blame] | 25 | */ |
| 26 | PathConverter pathConverter(); |
Klaus Aehlig | ee3e192 | 2017-04-07 14:25:27 +0000 | [diff] [blame] | 27 | |
| 28 | /** |
shahan | dae78fa | 2018-04-09 01:30:08 -0700 | [diff] [blame] | 29 | * Return the {@link ArtifactGroupNamer} that can be used to refer to a {@code |
ulfjack | 26e586d | 2018-05-17 08:42:13 -0700 | [diff] [blame] | 30 | * NestedSet<Artifact>} declared via the {@link |
| 31 | * com.google.devtools.build.lib.actions.EventReportingArtifacts} interface. |
Klaus Aehlig | ee3e192 | 2017-04-07 14:25:27 +0000 | [diff] [blame] | 32 | */ |
| 33 | ArtifactGroupNamer artifactGroupNamer(); |
ulfjack | fbf2756 | 2018-05-18 12:46:54 -0700 | [diff] [blame] | 34 | |
| 35 | /** |
| 36 | * Returns the options for the build event stream. |
| 37 | */ |
| 38 | BuildEventProtocolOptions getOptions(); |
aehlig | 617bb89 | 2017-04-04 15:03:23 +0000 | [diff] [blame] | 39 | } |