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.
5 package org.chromium.mojo.bindings;
7 import java.io.Closeable;
10 * A class which implements this interface can receive {@link Message} objects.
12 public interface MessageReceiver extends Closeable {
15 * Receive a {@link Message}. The {@link MessageReceiver} is allowed to mutate the message.
16 * Returns |true| if the message has been handled, |false| otherwise.
18 boolean accept(Message message);
21 * @see java.io.Closeable#close()