aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/buildeventstream/BuildEvent.java
diff options
context:
space:
mode:
authorGravatar Klaus Aehlig <aehlig@google.com>2016-09-28 12:13:17 +0000
committerGravatar Yun Peng <pcloudy@google.com>2016-09-28 14:01:14 +0000
commitf009901a502fd7d45ee79c53612cad54ed3ecb9b (patch)
treeb2bd04732e4703f1061c534e08a90c39599c544a /src/main/java/com/google/devtools/build/lib/buildeventstream/BuildEvent.java
parentbbab9ed571129201763e0f1175920c5a7df98284 (diff)
Add interfaces for the build event protocol
Bazel in the will provide a machine-readable stream of important build events. These interfaces set up the framework and expectations about the produced events and the entities distributing those events. -- Change-Id: If2c3b2e11c31b0136b57eadeef2d2f8f8fe5e2e7 Reviewed-on: https://bazel-review.googlesource.com/#/c/6272 MOS_MIGRATED_REVID=134522369
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/buildeventstream/BuildEvent.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/buildeventstream/BuildEvent.java31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/buildeventstream/BuildEvent.java b/src/main/java/com/google/devtools/build/lib/buildeventstream/BuildEvent.java
new file mode 100644
index 0000000000..901586fa40
--- /dev/null
+++ b/src/main/java/com/google/devtools/build/lib/buildeventstream/BuildEvent.java
@@ -0,0 +1,31 @@
+// Copyright 2016 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.buildeventstream;
+
+/**
+ * Interface for objects that can be posted on the public event stream.
+ *
+ * <p>Objects posted on the build-event stream will implement this interface. This allows
+ * pass-through of events, as well as proper chaining of events.
+ */
+public interface BuildEvent extends ChainableEvent {
+ /**
+ * Provide a binary representation of the event.
+ *
+ * <p>Provide a presentation of the event according to the specified binary format, as appropriate
+ * protocol buffer.
+ */
+ BuildEventStreamProtos.BuildEvent asStreamProto();
+}