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 org.chromium.mojo.system.MessagePipeHandle;
10 * A {@link Router} will handle mojo message and forward those to a {@link Connector}. It deals with
11 * parsing of headers and adding of request ids in order to be able to match a response to a
14 public interface Router extends MessageReceiverWithResponder, HandleOwner<MessagePipeHandle> {
17 * Start listening for incoming messages.
22 * Set the {@link MessageReceiverWithResponder} that will deserialize and use the message
23 * received from the pipe.
25 public void setIncomingMessageReceiver(MessageReceiverWithResponder incomingMessageReceiver);
28 * Set the handle that will be notified of errors on the message pipe.
30 public void setErrorHandler(ConnectionErrorHandler errorHandler);