// 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; import org.chromium.mojo.system.MessagePipeHandle; /** * One end of the message pipe representing a request to create an implementation to be bound to it. * The other end of the pipe is bound to a proxy, which can be used immediately, while the * InterfaceRequest is being sent. *

* InterfaceRequest are built using |Interface.Manager|. * * @param

the type of the remote interface proxy. */ public class InterfaceRequest

implements HandleOwner { /** * The handle which will be sent and will be connected to the implementation. */ private final MessagePipeHandle mHandle; /** * Constructor. * * @param handle the handle which will be sent and will be connected to the implementation. */ InterfaceRequest(MessagePipeHandle handle) { mHandle = handle; } /** * @see HandleOwner#passHandle() */ @Override public MessagePipeHandle passHandle() { return mHandle.pass(); } /** * @see java.io.Closeable#close() */ @Override public void close() { mHandle.close(); } }