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.system;
7 import org.chromium.mojo.system.DataPipe.ConsumerHandle;
8 import org.chromium.mojo.system.DataPipe.ProducerHandle;
11 * A mojo handle of unknown type. This handle can be typed by using one of its methods, which will
12 * return a handle of the requested type and invalidate this object. No validation is made when the
13 * conversion operation is called.
15 public interface UntypedHandle extends Handle {
18 * Returns the underlying handle, as a {@link MessagePipeHandle}, invalidating this
21 public MessagePipeHandle toMessagePipeHandle();
24 * Returns the underlying handle, as a {@link ConsumerHandle}, invalidating this representation.
26 public ConsumerHandle toDataPipeConsumerHandle();
29 * Returns the underlying handle, as a {@link ProducerHandle}, invalidating this representation.
31 public ProducerHandle toDataPipeProducerHandle();
34 * Returns the underlying handle, as a {@link SharedBufferHandle}, invalidating this
37 public SharedBufferHandle toSharedBufferHandle();