Index: mojo/bindings/java/src/org/chromium/mojo/bindings/MessageReceiverWithResponder.java |
diff --git a/mojo/bindings/java/src/org/chromium/mojo/bindings/MessageReceiverWithResponder.java b/mojo/bindings/java/src/org/chromium/mojo/bindings/MessageReceiverWithResponder.java |
new file mode 100644 |
index 0000000000000000000000000000000000000000..7e80cb1fa09a70e895bbea076a677d7273fc5f1e |
--- /dev/null |
+++ b/mojo/bindings/java/src/org/chromium/mojo/bindings/MessageReceiverWithResponder.java |
@@ -0,0 +1,19 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+package org.chromium.mojo.bindings; |
+ |
+/** |
+ * A {@link MessageReceiver} that can also handle the handle the response message generated from the |
+ * given message. |
+ */ |
+public interface MessageReceiverWithResponder extends MessageReceiver { |
+ |
+ /** |
+ * A variant on Accept that registers a MessageReceiver (known as the responder) to handle the |
rmcilroy
2014/07/10 19:03:58
A variant on {@link MessageReceiver#accept()} that
qsr
2014/07/11 11:42:08
The issue with this is that it will force implemen
rmcilroy
2014/07/14 14:44:56
Hmm, I really think this is generally a bad idea,
|
+ * response message generated from the given message. The responder's Accept method may be |
+ * called during AcceptWithResponder or some time after its return. |
+ */ |
+ boolean acceptWithResponder(Message message, MessageReceiver receiver); |
rmcilroy
2014/07/10 19:03:58
/s/receiver/responder
qsr
2014/07/11 11:42:08
Done.
|
+} |