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 * One end of the message pipe representing a request to create an implementation to be bound to it.
11 * The other end of the pipe is bound to a proxy, which can be used immediately, while the
12 * InterfaceRequest is being sent.
14 * InterfaceRequest are built using |Interface.Manager|.
16 * @param <P> the type of the remote interface proxy.
18 public class InterfaceRequest<P extends Interface> implements HandleOwner<MessagePipeHandle> {
21 * The handle which will be sent and will be connected to the implementation.
23 private final MessagePipeHandle mHandle;
28 * @param handle the handle which will be sent and will be connected to the implementation.
30 InterfaceRequest(MessagePipeHandle handle) {
35 * @see HandleOwner#passHandle()
38 public MessagePipeHandle passHandle() {
39 return mHandle.pass();
43 * @see java.io.Closeable#close()