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. 4 5package org.chromium.mojo.system; 6 7import org.chromium.mojo.system.DataPipe.ConsumerHandle; 8import org.chromium.mojo.system.DataPipe.ProducerHandle; 9 10/** 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. 14 */ 15public interface UntypedHandle extends Handle { 16 17 /** 18 * Returns the underlying handle, as a {@link MessagePipeHandle}, invalidating this 19 * representation. 20 */ 21 public MessagePipeHandle toMessagePipeHandle(); 22 23 /** 24 * Returns the underlying handle, as a {@link ConsumerHandle}, invalidating this representation. 25 */ 26 public ConsumerHandle toDataPipeConsumerHandle(); 27 28 /** 29 * Returns the underlying handle, as a {@link ProducerHandle}, invalidating this representation. 30 */ 31 public ProducerHandle toDataPipeProducerHandle(); 32 33 /** 34 * Returns the underlying handle, as a {@link SharedBufferHandle}, invalidating this 35 * representation. 36 */ 37 public SharedBufferHandle toSharedBufferHandle(); 38 39} 40