1// Copyright 2014 The Chromium Authors. All rights reserved. 2// Use of this source code is governed by a BSD-style license that can be 3// found in the LICENSE file. 4 5package org.chromium.mojo.bindings; 6 7/** 8 * A {@link MessageReceiver} that can also handle the handle the response message generated from the 9 * given message. 10 */ 11public interface MessageReceiverWithResponder extends MessageReceiver { 12 13 /** 14 * A variant on {@link #accept(Message)} that registers a {@link MessageReceiver} 15 * (known as the responder) to handle the response message generated from the given message. The 16 * responder's {@link #accept(Message)} method may be called as part of the call to 17 * {@link #acceptWithResponder(Message, MessageReceiver)}, or some time after its 18 * return. 19 */ 20 boolean acceptWithResponder(Message message, MessageReceiver responder); 21} 22