Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(394)

Unified Diff: pkg/analyzer/lib/instrumentation/instrumentation.dart

Issue 833633004: File-based and multicast InstrumentationServer implementations. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/analyzer/lib/instrumentation/instrumentation.dart
diff --git a/pkg/analyzer/lib/instrumentation/instrumentation.dart b/pkg/analyzer/lib/instrumentation/instrumentation.dart
index 77547fbee5267f77df30737fd4b219a97465d5e4..a3c13768a9dbe8292b65ea0e15caad57270b9e69 100644
--- a/pkg/analyzer/lib/instrumentation/instrumentation.dart
+++ b/pkg/analyzer/lib/instrumentation/instrumentation.dart
@@ -186,3 +186,33 @@ class InstrumentationService {
return object.toString();
}
}
+
+/**
+ * An [InstrumentationServer] that sends messages to multiple instances.
+ */
+class MulticastInstrumentationServer implements InstrumentationServer {
+ final List<InstrumentationServer> _servers;
+
+ MulticastInstrumentationServer(this._servers);
+
+ @override
+ void log(String message) {
+ for (InstrumentationServer server in _servers) {
+ server.log(message);
+ }
+ }
+
+ @override
+ void logWithPriority(String message) {
+ for (InstrumentationServer server in _servers) {
+ server.logWithPriority(message);
+ }
+ }
+
+ @override
+ void shutdown() {
+ for (InstrumentationServer server in _servers) {
+ server.shutdown();
+ }
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698